Skip to content

Commit

Permalink
chg: Bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Dec 1, 2024
1 parent 7c684a1 commit fad0e73
Show file tree
Hide file tree
Showing 3 changed files with 435 additions and 355 deletions.
7 changes: 4 additions & 3 deletions lacuscore/lacuscore.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
from uuid import uuid4
from urllib.parse import urlsplit

import ua_parser

from dns.resolver import Cache
from dns.asyncresolver import Resolver
from dns.exception import DNSException
Expand All @@ -34,7 +36,6 @@
from redis import Redis
from redis.exceptions import ConnectionError as RedisConnectionError
from redis.exceptions import DataError
from ua_parser import user_agent_parser # type: ignore[import-untyped]

from . import task_logger
from .helpers import (
Expand Down Expand Up @@ -448,8 +449,8 @@ async def _capture(self, uuid: str, priority: int) -> None:
if to_capture.browser:
browser_engine = to_capture.browser
elif to_capture.user_agent:
parsed_string = user_agent_parser.ParseUserAgent(to_capture.user_agent)
browser_family = parsed_string['family'].lower()
parsed_string = ua_parser.parse(to_capture.user_agent).with_defaults()
browser_family = parsed_string.user_agent.family.lower()
if browser_family.startswith('chrom'):
browser_engine = 'chromium'
elif browser_family.startswith('firefox'):
Expand Down
Loading

0 comments on commit fad0e73

Please sign in to comment.