Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: re-structure modules (#156)
NTFSvolume6767eb3bd221
diff --git a/cyberdrop_dl/__main__.py b/cyberdrop_dl/__main__.pyindex 8bd1ebcad..80426125c 100644--- a/cyberdrop_dl/__main__.py+++ b/cyberdrop_dl/__main__.py@@ -17,9 +17,9 @@ from cyberdrop_dl.logs import log_spacer, setup_console_logging, setup_file_loggfrom cyberdrop_dl.managers.manager import AppData, Managerfrom cyberdrop_dl.models.types import HttpURLfrom cyberdrop_dl.scrape_mapper import ScrapeMapper-from cyberdrop_dl.utils import apprise, check_latest_pypi-from cyberdrop_dl.utils.sorting import Sorter-from cyberdrop_dl.utils.utilities import check_partials_and_empty_folders+from cyberdrop_dl.sorter import Sorter+from cyberdrop_dl.updates import check_latest_pypi+from cyberdrop_dl.utils import apprise, check_partials_and_empty_folderslogger = logging.getLogger("cyberdrop_dl")diff --git a/cyberdrop_dl/clients/__init__.py b/cyberdrop_dl/clients/__init__.pyindex 7aaabd43c..1c815d37a 100644--- a/cyberdrop_dl/clients/__init__.py+++ b/cyberdrop_dl/clients/__init__.py@@ -24,8 +24,8 @@ if TYPE_CHECKING:from curl_cffi.requests.session import HttpMethodfrom cyberdrop_dl.clients import flaresolverr- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.managers.client_manager import ClientManager+ from cyberdrop_dl.url_objects import AbsoluteHttpURLlogger = logging.getLogger(__name__)diff --git a/cyberdrop_dl/clients/download_client.py b/cyberdrop_dl/clients/download_client.pyindex ed6dda87a..d497be86c 100644--- a/cyberdrop_dl/clients/download_client.py+++ b/cyberdrop_dl/clients/download_client.py@@ -24,10 +24,10 @@ if TYPE_CHECKING:import aiohttp- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, MediaItemfrom cyberdrop_dl.managers.client_manager import ClientManagerfrom cyberdrop_dl.managers.manager import Managerfrom cyberdrop_dl.progress import ProgressHook+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItemlogger = logging.getLogger(__name__)diff --git a/cyberdrop_dl/clients/flaresolverr.py b/cyberdrop_dl/clients/flaresolverr.pyindex 6c6bb8f24..687d720d1 100644--- a/cyberdrop_dl/clients/flaresolverr.py+++ b/cyberdrop_dl/clients/flaresolverr.py@@ -12,9 +12,9 @@ from typing import TYPE_CHECKING, Anyimport aiohttpfrom multidict import CIMultiDict, CIMultiDictProxy-from cyberdrop_dl.data_structures import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import DDOSGuardErrorfrom cyberdrop_dl.progress.scraping import show_msg+from cyberdrop_dl.url_objects import AbsoluteHttpURLif TYPE_CHECKING:from collections.abc import Callable, Iterable, Mappingdiff --git a/cyberdrop_dl/clients/jdownloader.py b/cyberdrop_dl/clients/jdownloader.pyindex bfc21265e..93cda46cb 100644--- a/cyberdrop_dl/clients/jdownloader.py+++ b/cyberdrop_dl/clients/jdownloader.py@@ -15,8 +15,8 @@ if TYPE_CHECKING:from myjdapi.myjdapi import Jddevice- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.managers.manager import Manager+ from cyberdrop_dl.url_objects import AbsoluteHttpURL@dataclasses.dataclass(frozen=True, slots=True)diff --git a/cyberdrop_dl/clients/response.py b/cyberdrop_dl/clients/response.pyindex 0fc0bbffa..4a8b7fc66 100644--- a/cyberdrop_dl/clients/response.py+++ b/cyberdrop_dl/clients/response.py@@ -17,9 +17,9 @@ from propcache import under_cached_propertyfrom typing_extensions import TypeVar, overridefrom cyberdrop_dl.clients.flaresolverr import Solution as FlaresolverrSolution-from cyberdrop_dl.data_structures import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import InvalidContentTypeError, ScrapeError-from cyberdrop_dl.utils.utilities import parse_url+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import parse_urlif TYPE_CHECKING:from collections.abc import AsyncIteratordiff --git a/cyberdrop_dl/config/settings.py b/cyberdrop_dl/config/settings.pyindex d326e1013..8fe1d0232 100755--- a/cyberdrop_dl/config/settings.py+++ b/cyberdrop_dl/config/settings.py@@ -28,8 +28,8 @@ from cyberdrop_dl.models.types import (PathOrNone,)from cyberdrop_dl.models.validators import falsy_as, to_timedelta+from cyberdrop_dl.utils import delete_empty_files_and_foldersfrom cyberdrop_dl.utils.strings import validate_format_string-from cyberdrop_dl.utils.utilities import delete_empty_files_and_folders_SORTING_COMMON_FIELDS = {"base_dir",diff --git a/cyberdrop_dl/crawlers/__init__.py b/cyberdrop_dl/crawlers/__init__.pyindex cc6f0b5f9..b0d30f002 100644--- a/cyberdrop_dl/crawlers/__init__.py+++ b/cyberdrop_dl/crawlers/__init__.py@@ -3,8 +3,8 @@ from __future__ import annotationsimport refrom typing import TYPE_CHECKING, TypeVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import is_absolute_http_url, remove_trailing_slash+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import is_absolute_http_url, remove_trailing_slashif TYPE_CHECKING:from collections.abc import Iterablediff --git a/cyberdrop_dl/crawlers/_chevereto.py b/cyberdrop_dl/crawlers/_chevereto.pyindex 0abfb40b7..0faf661dd 100644--- a/cyberdrop_dl/crawlers/_chevereto.py+++ b/cyberdrop_dl/crawlers/_chevereto.py@@ -4,17 +4,16 @@ import urllib.parsefrom typing import TYPE_CHECKING, Any, ClassVar, finalfrom cyberdrop_dl.crawlers.crawler import Crawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import PasswordProtectedError-from cyberdrop_dl.utils import css, json, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, json, open_graphif TYPE_CHECKING:from collections.abc import Generator, Mappingfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/_chibisafe.py b/cyberdrop_dl/crawlers/_chibisafe.pyindex 22f7adee9..ac41b90b5 100644--- a/cyberdrop_dl/crawlers/_chibisafe.py+++ b/cyberdrop_dl/crawlers/_chibisafe.py@@ -17,12 +17,12 @@ from pydantic import Fieldfrom cyberdrop_dl.crawlers.crawler import Crawlerfrom cyberdrop_dl.models import AliasModel+from cyberdrop_dl.utils import DictDataclass, error_handling_wrapperfrom cyberdrop_dl.utils.dates import to_timestamp-from cyberdrop_dl.utils.utilities import DictDataclass, error_handling_wrapperif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem@dataclasses.dataclass(slots=True)diff --git a/cyberdrop_dl/crawlers/_fluid_player.py b/cyberdrop_dl/crawlers/_fluid_player.pyindex 381078d87..ba6321358 100644--- a/cyberdrop_dl/crawlers/_fluid_player.py+++ b/cyberdrop_dl/crawlers/_fluid_player.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVar, NamedTuplefrom cyberdrop_dl.crawlers.crawler import Crawler-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/_forum.py b/cyberdrop_dl/crawlers/_forum.pyindex de56125ab..c109b1e2e 100644--- a/cyberdrop_dl/crawlers/_forum.py+++ b/cyberdrop_dl/crawlers/_forum.py@@ -20,18 +20,17 @@ from typing import TYPE_CHECKING, ClassVar, Protocol, finalfrom bs4 import BeautifulSoup, Tagfrom cyberdrop_dl.crawlers.crawler import Crawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import LoginError, MaxChildrenError, ScrapeError-from cyberdrop_dl.utils import css+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, is_blob_or_svgfrom cyberdrop_dl.utils.dates import TimeStamp, to_timestamp-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between, is_blob_or_svgif TYPE_CHECKING:from collections.abc import AsyncGenerator, Iterable, Sequencefrom aiohttp import ClientResponse- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemLINK_TRASH_MAPPING = {".th.": ".", ".md.": ".", "ifr": "watch"}HTTP_REGEX_LINKS = re.compile(diff --git a/cyberdrop_dl/crawlers/_hls.py b/cyberdrop_dl/crawlers/_hls.pyindex 7caa36872..f9ba5a04c 100644--- a/cyberdrop_dl/crawlers/_hls.py+++ b/cyberdrop_dl/crawlers/_hls.py@@ -12,7 +12,7 @@ if TYPE_CHECKING:import aiohttp- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+ from cyberdrop_dl.url_objects import AbsoluteHttpURLclass HLSParser(ABC):diff --git a/cyberdrop_dl/crawlers/_kvs.py b/cyberdrop_dl/crawlers/_kvs.pyindex 6b6b2bb65..232e9daa3 100644--- a/cyberdrop_dl/crawlers/_kvs.py+++ b/cyberdrop_dl/crawlers/_kvs.py@@ -7,17 +7,17 @@ import refrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures import AbsoluteHttpURL, Resolutionfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between, parse_url+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, open_graph, parse_urlif TYPE_CHECKING:from collections.abc import Sequencefrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem@dataclasses.dataclass(slots=True)diff --git a/cyberdrop_dl/crawlers/_one_manager.py b/cyberdrop_dl/crawlers/_one_manager.pyindex 22ae7f5b9..de1a448c1 100644--- a/cyberdrop_dl/crawlers/_one_manager.py+++ b/cyberdrop_dl/crawlers/_one_manager.py@@ -11,14 +11,13 @@ from typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawlerfrom cyberdrop_dl.exceptions import InvalidContentTypeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from bs4 import Tagfrom cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/_tubecorporate.py b/cyberdrop_dl/crawlers/_tubecorporate.pyindex d055ccee7..4e12c33bc 100644--- a/cyberdrop_dl/crawlers/_tubecorporate.py+++ b/cyberdrop_dl/crawlers/_tubecorporate.py@@ -6,10 +6,10 @@ from typing import TYPE_CHECKING, Any, ClassVar, Finalfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPathsfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem_FORMATS: Final = "_sd.mp4", "_hq.mp4", "_hd.mp4", "_fhd.mp4"diff --git a/cyberdrop_dl/crawlers/_yetishare.py b/cyberdrop_dl/crawlers/_yetishare.pyindex 897435f70..e99feae70 100644--- a/cyberdrop_dl/crawlers/_yetishare.py+++ b/cyberdrop_dl/crawlers/_yetishare.py@@ -7,11 +7,10 @@ from bs4 import BeautifulSoupfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_idfrom cyberdrop_dl.exceptions import DDOSGuardError, PasswordProtectedError, ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/anontransfer.py b/cyberdrop_dl/crawlers/anontransfer.pyindex 590faf6ec..46aeae7c9 100644--- a/cyberdrop_dl/crawlers/anontransfer.py+++ b/cyberdrop_dl/crawlers/anontransfer.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/anysex.py b/cyberdrop_dl/crawlers/anysex.pyindex 7277145ee..0bf5a8e81 100644--- a/cyberdrop_dl/crawlers/anysex.py+++ b/cyberdrop_dl/crawlers/anysex.py@@ -3,13 +3,12 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._fluid_player import FluidPlayerCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapper, open_graphif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/archivebate.py b/cyberdrop_dl/crawlers/archivebate.pyindex 03e4adbf0..b3e6ff8f9 100644--- a/cyberdrop_dl/crawlers/archivebate.py+++ b/cyberdrop_dl/crawlers/archivebate.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, open_graphif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/ashemaletube.py b/cyberdrop_dl/crawlers/ashemaletube.pyindex 037761f1e..86694d099 100644--- a/cyberdrop_dl/crawlers/ashemaletube.py+++ b/cyberdrop_dl/crawlers/ashemaletube.py@@ -5,16 +5,15 @@ from enum import StrEnumfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, m3u8-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, m3u8if TYPE_CHECKING:from bs4 import BeautifulSoup, Tag- from cyberdrop_dl.data_structures.mediaprops import Resolution- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.mediaprops import Resolution+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/bandcamp.py b/cyberdrop_dl/crawlers/bandcamp.pyindex b00c74dc4..e4adfc710 100644--- a/cyberdrop_dl/crawlers/bandcamp.py+++ b/cyberdrop_dl/crawlers/bandcamp.py@@ -8,15 +8,14 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl import envfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, dates-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, dates, error_handling_wrapperif TYPE_CHECKING:from collections.abc import Generator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemSUPPORTED_FORMATS = "mp3-320", "mp3", "aac-hi", "wav", "flac", "vorbis", "aiff", "alas" # Ordered by compatibilityUSE_FORMATS = tuple(dict.fromkeys((env.BANDCAMP_FORMATS).split(","))) if env.BANDCAMP_FORMATS else SUPPORTED_FORMATSdiff --git a/cyberdrop_dl/crawlers/beeg.py b/cyberdrop_dl/crawlers/beeg.pyindex f991b0738..a5a0d2f18 100644--- a/cyberdrop_dl/crawlers/beeg.py+++ b/cyberdrop_dl/crawlers/beeg.py@@ -5,13 +5,13 @@ from collections.abc import Generatorfrom typing import TYPE_CHECKING, Any, ClassVar, Literalfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import DictDataclass, error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import DictDataclass, error_handling_wrapperif TYPE_CHECKING:from collections.abc import Generator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_JSON_URL = AbsoluteHttpURL("https://store.externulls.com/facts/file/")diff --git a/cyberdrop_dl/crawlers/box_dot_com.py b/cyberdrop_dl/crawlers/box_dot_com.pyindex 72728b0c7..ff0a0d94e 100644--- a/cyberdrop_dl/crawlers/box_dot_com.py+++ b/cyberdrop_dl/crawlers/box_dot_com.py@@ -9,14 +9,13 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom pydantic import Fieldfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeErrorfrom cyberdrop_dl.models import AliasModel-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass ItemType(StrEnum):diff --git a/cyberdrop_dl/crawlers/bunkrr.py b/cyberdrop_dl/crawlers/bunkrr.pyindex 5a94f5f99..5018d5c62 100644--- a/cyberdrop_dl/crawlers/bunkrr.py+++ b/cyberdrop_dl/crawlers/bunkrr.py@@ -12,17 +12,16 @@ from aiohttp import ClientConnectorErrorfrom cyberdrop_dl.constants import FileExtfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import DDOSGuardError-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper, parse_url, xor_decrypt+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graph, parse_url, xor_decryptif TYPE_CHECKING:from collections.abc import Callable, Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_DOWNLOAD_API_ENTRYPOINT = AbsoluteHttpURL("https://apidl.bunkr.ru/api/_001_v2")diff --git a/cyberdrop_dl/crawlers/bunkrr_albums_io.py b/cyberdrop_dl/crawlers/bunkrr_albums_io.pyindex 5ca8beafc..2055e8d99 100644--- a/cyberdrop_dl/crawlers/bunkrr_albums_io.py+++ b/cyberdrop_dl/crawlers/bunkrr_albums_io.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass BunkrAlbumsIOCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/buzzheavier.py b/cyberdrop_dl/crawlers/buzzheavier.pyindex aa0b2229d..a73104fa8 100644--- a/cyberdrop_dl/crawlers/buzzheavier.py+++ b/cyberdrop_dl/crawlers/buzzheavier.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://buzzheavier.com")diff --git a/cyberdrop_dl/crawlers/camwhores_dot_tv.py b/cyberdrop_dl/crawlers/camwhores_dot_tv.pyindex 68645f9f6..c7fa2f881 100644--- a/cyberdrop_dl/crawlers/camwhores_dot_tv.py+++ b/cyberdrop_dl/crawlers/camwhores_dot_tv.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._kvs import KernelVideoSharingCrawlerfrom cyberdrop_dl.crawlers.porntrex import PorntrexCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.utils import cssif TYPE_CHECKING:diff --git a/cyberdrop_dl/crawlers/catbox.py b/cyberdrop_dl/crawlers/catbox.pyindex 9e9b6adee..60decfd4b 100644--- a/cyberdrop_dl/crawlers/catbox.py+++ b/cyberdrop_dl/crawlers/catbox.py@@ -3,10 +3,10 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://catbox.moe")diff --git a/cyberdrop_dl/crawlers/cloud_mail_ru.py b/cyberdrop_dl/crawlers/cloud_mail_ru.pyindex ad40eed53..bf614bee4 100644--- a/cyberdrop_dl/crawlers/cloud_mail_ru.py+++ b/cyberdrop_dl/crawlers/cloud_mail_ru.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass CloudMailRuCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/cloudflare_stream.py b/cyberdrop_dl/crawlers/cloudflare_stream.pyindex 7df648ae6..d57294137 100644--- a/cyberdrop_dl/crawlers/cloudflare_stream.py+++ b/cyberdrop_dl/crawlers/cloudflare_stream.py@@ -9,13 +9,13 @@ import uuidfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperfrom cyberdrop_dl.utils.json import JSONWebToken, is_jwt-from cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_DEFAULT_VIDEO_CDN = AbsoluteHttpURL("https://watch.cloudflarestream.com")diff --git a/cyberdrop_dl/crawlers/coomer.py b/cyberdrop_dl/crawlers/coomer.pyindex d546a1bed..991b1f917 100644--- a/cyberdrop_dl/crawlers/coomer.py+++ b/cyberdrop_dl/crawlers/coomer.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .kemono import KemonoBaseCrawlerdiff --git a/cyberdrop_dl/crawlers/crawler.py b/cyberdrop_dl/crawlers/crawler.pyindex 574798c7a..c4814d149 100644--- a/cyberdrop_dl/crawlers/crawler.py+++ b/cyberdrop_dl/crawlers/crawler.py@@ -22,21 +22,23 @@ from typing_extensions import deprecatedfrom cyberdrop_dl.clients import HTTPClient, HTTPClientProxyfrom cyberdrop_dl.crawlers._hls import HLSParser-from cyberdrop_dl.data_structures.mediaprops import ISO639Subtitle, Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, MediaItem, ScrapeItemfrom cyberdrop_dl.downloader.downloader import Downloaderfrom cyberdrop_dl.exceptions import MaxChildrenError, NoExtensionError, ScrapeError-from cyberdrop_dl.utils import css, dates, m3u8-from cyberdrop_dl.utils.filepath import compose_filename, get_filename_and_ext, remove_file_id-from cyberdrop_dl.utils.strings import safe_format-from cyberdrop_dl.utils.utilities import (+from cyberdrop_dl.mediaprops import ISO639Subtitle, Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItem, ScrapeItem+from cyberdrop_dl.utils import (+ css,+ dates,error_handling_context,error_handling_wrapper,get_download_path,is_absolute_http_url,is_blob_or_svg,+ m3u8,parse_url,)+from cyberdrop_dl.utils.filepath import compose_filename, get_filename_and_ext, remove_file_id+from cyberdrop_dl.utils.strings import safe_formatif TYPE_CHECKING:from collections.abc import AsyncGenerator, AsyncIterator, Callable, Coroutine, Generator, Iterable, Mappingdiff --git a/cyberdrop_dl/crawlers/cyberdrop.py b/cyberdrop_dl/crawlers/cyberdrop.pyindex 3fbdc6e16..d02e60e92 100644--- a/cyberdrop_dl/crawlers/cyberdrop.py+++ b/cyberdrop_dl/crawlers/cyberdrop.py@@ -4,12 +4,11 @@ import asynciofrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_API_ENTRYPOINT = AbsoluteHttpURL("https://api.cyberdrop.cr/api/")_PRIMARY_URL = AbsoluteHttpURL("https://cyberdrop.cr/")diff --git a/cyberdrop_dl/crawlers/cyberfile.py b/cyberdrop_dl/crawlers/cyberfile.pyindex a52274f88..bae8c54cb 100644--- a/cyberdrop_dl/crawlers/cyberfile.py+++ b/cyberdrop_dl/crawlers/cyberfile.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom ._yetishare import YetiShareCrawlerdiff --git a/cyberdrop_dl/crawlers/desivideo.py b/cyberdrop_dl/crawlers/desivideo.pyindex 85d025030..d21a19f90 100644--- a/cyberdrop_dl/crawlers/desivideo.py+++ b/cyberdrop_dl/crawlers/desivideo.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/dirtyship.py b/cyberdrop_dl/crawlers/dirtyship.pyindex 5e7c5dac7..0387230ac 100644--- a/cyberdrop_dl/crawlers/dirtyship.py+++ b/cyberdrop_dl/crawlers/dirtyship.py@@ -4,17 +4,16 @@ import jsonfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, parse_url+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, parse_urlif TYPE_CHECKING:from collections.abc import Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/discourse/_discourse.py b/cyberdrop_dl/crawlers/discourse/_discourse.pyindex 29859fd01..98ebe87fc 100644--- a/cyberdrop_dl/crawlers/discourse/_discourse.py+++ b/cyberdrop_dl/crawlers/discourse/_discourse.py@@ -13,16 +13,15 @@ from pydantic import BaseModelfrom cyberdrop_dl.crawlers._forum import MessageBoardCrawlerfrom cyberdrop_dl.exceptions import MaxChildrenError-from cyberdrop_dl.utils import css+from cyberdrop_dl.utils import css, error_handling_wrapperfrom cyberdrop_dl.utils.dates import to_timestamp-from cyberdrop_dl.utils.utilities import error_handling_wrapperfrom .models import AvailablePost, PostStream, Topicif TYPE_CHECKING:from collections.abc import AsyncIterable, Iterable- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem_T = TypeVar("_T")_MAX_POSTS_PER_REQUEST = 50diff --git a/cyberdrop_dl/crawlers/doodstream.py b/cyberdrop_dl/crawlers/doodstream.pyindex b2a399af8..4d14e3f80 100644--- a/cyberdrop_dl/crawlers/doodstream.py+++ b/cyberdrop_dl/crawlers/doodstream.py@@ -7,14 +7,13 @@ import timefrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/dropbox.py b/cyberdrop_dl/crawlers/dropbox.pyindex acb8239d4..c4e95cc99 100644--- a/cyberdrop_dl/crawlers/dropbox.py+++ b/cyberdrop_dl/crawlers/dropbox.py@@ -4,14 +4,14 @@ import dataclassesfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import LoginError, ScrapeError-from cyberdrop_dl.utils.utilities import DictDataclass, error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import DictDataclass, error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_PRIMARY_URL = AbsoluteHttpURL("https://www.dropbox.com")diff --git a/cyberdrop_dl/crawlers/e621.py b/cyberdrop_dl/crawlers/e621.pyindex b35b12f6d..0c1b7fa33 100644--- a/cyberdrop_dl/crawlers/e621.py+++ b/cyberdrop_dl/crawlers/e621.py@@ -5,14 +5,14 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl import __version__from cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://e621.net")diff --git a/cyberdrop_dl/crawlers/efukt.py b/cyberdrop_dl/crawlers/efukt.pyindex a8fb6a0b9..716b50f39 100644--- a/cyberdrop_dl/crawlers/efukt.py+++ b/cyberdrop_dl/crawlers/efukt.py@@ -4,14 +4,13 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperfrom cyberdrop_dl.utils.dates import to_timestamp-from cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://efukt.com")diff --git a/cyberdrop_dl/crawlers/ehentai.py b/cyberdrop_dl/crawlers/ehentai.pyindex 3c120231f..30278e292 100644--- a/cyberdrop_dl/crawlers/ehentai.py+++ b/cyberdrop_dl/crawlers/ehentai.py@@ -5,12 +5,11 @@ from typing import TYPE_CHECKING, ClassVarfrom typing_extensions import overridefrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/eightmuses.py b/cyberdrop_dl/crawlers/eightmuses.pyindex cf686e9d1..c400d94fa 100644--- a/cyberdrop_dl/crawlers/eightmuses.py+++ b/cyberdrop_dl/crawlers/eightmuses.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemTILE_SELECTOR = "a[class*=c-tile]"diff --git a/cyberdrop_dl/crawlers/eporner.py b/cyberdrop_dl/crawlers/eporner.pyindex 0dc91c22b..fb0f49961 100644--- a/cyberdrop_dl/crawlers/eporner.py+++ b/cyberdrop_dl/crawlers/eporner.py@@ -6,16 +6,15 @@ from typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl import envfrom cyberdrop_dl.compat import IntEnumfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:from bs4 import BeautifulSoup, Tag- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/erome.py b/cyberdrop_dl/crawlers/erome.pyindex 0f73f2598..6f51c39a1 100644--- a/cyberdrop_dl/crawlers/erome.py+++ b/cyberdrop_dl/crawlers/erome.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapper, open_graphif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/fapello.py b/cyberdrop_dl/crawlers/fapello.pyindex 0f44fed5c..0f626fcad 100644--- a/cyberdrop_dl/crawlers/fapello.py+++ b/cyberdrop_dl/crawlers/fapello.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemCONTENT_SELECTOR = "div[id=content] a"diff --git a/cyberdrop_dl/crawlers/fileditch.py b/cyberdrop_dl/crawlers/fileditch.pyindex a19f11bd3..87ccddf36 100644--- a/cyberdrop_dl/crawlers/fileditch.py+++ b/cyberdrop_dl/crawlers/fileditch.py@@ -3,13 +3,12 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemDOWNLOAD_SELECTOR = 'a.btn[href*="md5="]'HOMEPAGE_CATCHALL_FILE = "/s21/FHVZKQyAZlIsrneDAsp.jpeg"diff --git a/cyberdrop_dl/crawlers/files_vc.py b/cyberdrop_dl/crawlers/files_vc.pyindex 7fcd37376..275e660c6 100644--- a/cyberdrop_dl/crawlers/files_vc.py+++ b/cyberdrop_dl/crawlers/files_vc.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemAPI_ENTRYPOINT = AbsoluteHttpURL("https://api.files.vc/api")diff --git a/cyberdrop_dl/crawlers/filester.py b/cyberdrop_dl/crawlers/filester.pyindex d3aa5bfe8..0b97e5ad4 100644--- a/cyberdrop_dl/crawlers/filester.py+++ b/cyberdrop_dl/crawlers/filester.py@@ -4,16 +4,15 @@ import randomfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, open_graphif TYPE_CHECKING:from collections.abc import AsyncGeneratorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_CDN_URLS = AbsoluteHttpURL("https://cache1.filester.me"), AbsoluteHttpURL("https://cache6.filester.me")diff --git a/cyberdrop_dl/crawlers/flickr.py b/cyberdrop_dl/crawlers/flickr.pyindex a437d3e78..28462ddb4 100644--- a/cyberdrop_dl/crawlers/flickr.py+++ b/cyberdrop_dl/crawlers/flickr.py@@ -4,14 +4,14 @@ import itertoolsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_context, error_handling_wrapper, get_text_between+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_context, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass FlickrCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/fourchan.py b/cyberdrop_dl/crawlers/fourchan.pyindex 3c59fa4f0..861e76b9d 100644--- a/cyberdrop_dl/crawlers/fourchan.py+++ b/cyberdrop_dl/crawlers/fourchan.py@@ -5,12 +5,12 @@ from typing import TYPE_CHECKING, Any, ClassVar, NotRequired, TypedDictfrom bs4 import BeautifulSoupfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_API_ENTRYPOINT = AbsoluteHttpURL("https://a.4cdn.org/")_FILES_BASE_URL = AbsoluteHttpURL("https://i.4cdn.org/")diff --git a/cyberdrop_dl/crawlers/fsiblog.py b/cyberdrop_dl/crawlers/fsiblog.pyindex 5cf9053b5..0c342d7eb 100644--- a/cyberdrop_dl/crawlers/fsiblog.py+++ b/cyberdrop_dl/crawlers/fsiblog.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/fucking_fast.py b/cyberdrop_dl/crawlers/fucking_fast.pyindex 986cf8b44..9d873025f 100644--- a/cyberdrop_dl/crawlers/fucking_fast.py+++ b/cyberdrop_dl/crawlers/fucking_fast.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass FuckingFastCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/fuxxx.py b/cyberdrop_dl/crawlers/fuxxx.pyindex 7c0f5a71b..06c5a6efa 100644--- a/cyberdrop_dl/crawlers/fuxxx.py+++ b/cyberdrop_dl/crawlers/fuxxx.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass FuXXXCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/giphy.py b/cyberdrop_dl/crawlers/giphy.pyindex 25e32a467..5cb87390d 100644--- a/cyberdrop_dl/crawlers/giphy.py+++ b/cyberdrop_dl/crawlers/giphy.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass GiPhyCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/girlsreleased.py b/cyberdrop_dl/crawlers/girlsreleased.pyindex a349dca71..e524c5695 100644--- a/cyberdrop_dl/crawlers/girlsreleased.py+++ b/cyberdrop_dl/crawlers/girlsreleased.py@@ -6,11 +6,11 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom pydantic import dataclassesfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem@dataclasses.dataclass(frozen=True, slots=True)diff --git a/cyberdrop_dl/crawlers/gofile.py b/cyberdrop_dl/crawlers/gofile.pyindex 40c4198e2..dbb025a1a 100644--- a/cyberdrop_dl/crawlers/gofile.py+++ b/cyberdrop_dl/crawlers/gofile.py@@ -6,9 +6,9 @@ from hashlib import sha256from typing import TYPE_CHECKING, Any, ClassVar, Literal, NotRequired, TypedDict, TypeGuardfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import FILE_HOST_ALBUM, AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.exceptions import PasswordProtectedError, ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import FILE_HOST_ALBUM, AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator, Iterablediff --git a/cyberdrop_dl/crawlers/google_drive.py b/cyberdrop_dl/crawlers/google_drive.pyindex 4d05c7fff..7556f2b0a 100644--- a/cyberdrop_dl/crawlers/google_drive.py+++ b/cyberdrop_dl/crawlers/google_drive.py@@ -36,13 +36,12 @@ import asynciofrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem# This versions numbers and restrictions are not documented and may actually be wrongdiff --git a/cyberdrop_dl/crawlers/google_photos.py b/cyberdrop_dl/crawlers/google_photos.pyindex c06cd1fd9..0f8ec9dbe 100644--- a/cyberdrop_dl/crawlers/google_photos.py+++ b/cyberdrop_dl/crawlers/google_photos.py@@ -5,16 +5,15 @@ from dataclasses import dataclassfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from collections.abc import Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem@dataclass(slots=True, frozen=True)diff --git a/cyberdrop_dl/crawlers/gupload.py b/cyberdrop_dl/crawlers/gupload.pyindex f3958d36d..c117b7add 100644--- a/cyberdrop_dl/crawlers/gupload.py+++ b/cyberdrop_dl/crawlers/gupload.py@@ -6,12 +6,12 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, Any, ClassVar, Finalfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between, xor_decrypt+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapper, get_text_between, xor_decryptif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_KEY: Final = b"G7#kP!2qZxV9mRwL"diff --git a/cyberdrop_dl/crawlers/hclips.py b/cyberdrop_dl/crawlers/hclips.pyindex abd01dc18..16a3ed16d 100644--- a/cyberdrop_dl/crawlers/hclips.py+++ b/cyberdrop_dl/crawlers/hclips.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedDomainsdiff --git a/cyberdrop_dl/crawlers/hdzog.py b/cyberdrop_dl/crawlers/hdzog.pyindex 301498275..09e35323a 100644--- a/cyberdrop_dl/crawlers/hdzog.py+++ b/cyberdrop_dl/crawlers/hdzog.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass HDZogCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/hianime.py b/cyberdrop_dl/crawlers/hianime.pyindex 06c9e1f8a..c87cc227e 100644--- a/cyberdrop_dl/crawlers/hianime.py+++ b/cyberdrop_dl/crawlers/hianime.py@@ -9,13 +9,12 @@ import bs4from cyberdrop_dl.aio import WeakAsyncLocksfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_idfrom cyberdrop_dl.crawlers.megacloud import MegaCloudCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/hitomi_la.py b/cyberdrop_dl/crawlers/hitomi_la.pyindex bd90980b6..ee63809a3 100644--- a/cyberdrop_dl/crawlers/hitomi_la.py+++ b/cyberdrop_dl/crawlers/hitomi_la.py@@ -9,15 +9,15 @@ from datetime import datetime, timedeltafrom typing import TYPE_CHECKING, ClassVar, NamedTuple, Required, TypedDictfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperfrom cyberdrop_dl.utils.filepath import get_filename_and_ext-from cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemALLOW_AVIF = Falsediff --git a/cyberdrop_dl/crawlers/hotleak_vip.py b/cyberdrop_dl/crawlers/hotleak_vip.pyindex 818f84351..e360fac7d 100644--- a/cyberdrop_dl/crawlers/hotleak_vip.py+++ b/cyberdrop_dl/crawlers/hotleak_vip.py@@ -4,7 +4,7 @@ import jsonfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.leakedzone import LeakedZoneCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.utils import cssif TYPE_CHECKING:diff --git a/cyberdrop_dl/crawlers/hotleaks_dot_tv.py b/cyberdrop_dl/crawlers/hotleaks_dot_tv.pyindex 345f9a8b9..af6c61af5 100644--- a/cyberdrop_dl/crawlers/hotleaks_dot_tv.py+++ b/cyberdrop_dl/crawlers/hotleaks_dot_tv.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers.leakedzone import LeakedZoneCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLPRIMARY_URL = AbsoluteHttpURL("https://hotleaks.tv")IMAGES_CDN = AbsoluteHttpURL("https://image-cdn.hotleaks.tv")diff --git a/cyberdrop_dl/crawlers/hotmovs.py b/cyberdrop_dl/crawlers/hotmovs.pyindex 8e2987df7..4b2a6c301 100644--- a/cyberdrop_dl/crawlers/hotmovs.py+++ b/cyberdrop_dl/crawlers/hotmovs.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass HotMovsCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/hotpic.py b/cyberdrop_dl/crawlers/hotpic.pyindex 82541581f..717b738a9 100644--- a/cyberdrop_dl/crawlers/hotpic.py+++ b/cyberdrop_dl/crawlers/hotpic.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/http_direct.py b/cyberdrop_dl/crawlers/http_direct.pyindex 1756311e1..cfac9a4b9 100644--- a/cyberdrop_dl/crawlers/http_direct.py+++ b/cyberdrop_dl/crawlers/http_direct.py@@ -8,7 +8,7 @@ from cyberdrop_dl.exceptions import NoExtensionErrorfrom cyberdrop_dl.utils.filepath import get_filename_and_extif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass DirectHttpFile(Crawler, is_generic=True):diff --git a/cyberdrop_dl/crawlers/iceyfile.py b/cyberdrop_dl/crawlers/iceyfile.pyindex b81a38b73..f8b9aa06b 100644--- a/cyberdrop_dl/crawlers/iceyfile.py+++ b/cyberdrop_dl/crawlers/iceyfile.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom ._yetishare import YetiShareCrawlerdiff --git a/cyberdrop_dl/crawlers/imagebam.py b/cyberdrop_dl/crawlers/imagebam.pyindex d3c769017..011c9acf3 100644--- a/cyberdrop_dl/crawlers/imagebam.py+++ b/cyberdrop_dl/crawlers/imagebam.py@@ -4,14 +4,13 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/imagepond.py b/cyberdrop_dl/crawlers/imagepond.pyindex 90f360557..d88bb9567 100644--- a/cyberdrop_dl/crawlers/imagepond.py+++ b/cyberdrop_dl/crawlers/imagepond.py@@ -4,14 +4,13 @@ import dataclassesfrom typing import TYPE_CHECKING, ClassVar, Selffrom cyberdrop_dl.crawlers.crawler import Crawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/imgbb.py b/cyberdrop_dl/crawlers/imgbb.pyindex 2550d905e..b4925b7a8 100644--- a/cyberdrop_dl/crawlers/imgbb.py+++ b/cyberdrop_dl/crawlers/imgbb.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVar, Finalfrom cyberdrop_dl.crawlers._chevereto import CheveretoCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedDomains, SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemIMAGES_CDN: Final = "i.ibb.co"diff --git a/cyberdrop_dl/crawlers/imgbox.py b/cyberdrop_dl/crawlers/imgbox.pyindex 6df62f116..f022d985a 100644--- a/cyberdrop_dl/crawlers/imgbox.py+++ b/cyberdrop_dl/crawlers/imgbox.py@@ -3,10 +3,9 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import FILE_HOST_ALBUM, AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import FILE_HOST_ALBUM, AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import css, error_handling_wrapperPRIMARY_URL = AbsoluteHttpURL("https://imgbox.com")IMAGES_SELECTOR = "div#gallery-view-content img"diff --git a/cyberdrop_dl/crawlers/imglike.py b/cyberdrop_dl/crawlers/imglike.pyindex 385283b35..a49704201 100644--- a/cyberdrop_dl/crawlers/imglike.py+++ b/cyberdrop_dl/crawlers/imglike.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._chevereto import CheveretoCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLPRIMARY_URL = AbsoluteHttpURL("https://imglike.com")diff --git a/cyberdrop_dl/crawlers/imgur.py b/cyberdrop_dl/crawlers/imgur.pyindex c8504af8e..0e8aec83e 100644--- a/cyberdrop_dl/crawlers/imgur.py+++ b/cyberdrop_dl/crawlers/imgur.py@@ -3,13 +3,12 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_API_ENTRYPOINT = AbsoluteHttpURL("https://api.imgur.com/3/")_IMAGE_CDN = AbsoluteHttpURL("https://i.imgur.com")diff --git a/cyberdrop_dl/crawlers/imx_to.py b/cyberdrop_dl/crawlers/imx_to.pyindex 6a3e20d1e..61990b26f 100644--- a/cyberdrop_dl/crawlers/imx_to.py+++ b/cyberdrop_dl/crawlers/imx_to.py@@ -4,12 +4,11 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/incestflix.py b/cyberdrop_dl/crawlers/incestflix.pyindex 2736a9d2e..ff2acf3a5 100644--- a/cyberdrop_dl/crawlers/incestflix.py+++ b/cyberdrop_dl/crawlers/incestflix.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/influencer_bitches.py b/cyberdrop_dl/crawlers/influencer_bitches.pyindex e424b596d..384119ba1 100644--- a/cyberdrop_dl/crawlers/influencer_bitches.py+++ b/cyberdrop_dl/crawlers/influencer_bitches.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/inporn.py b/cyberdrop_dl/crawlers/inporn.pyindex 7de87eed7..5b5a2ed1b 100644--- a/cyberdrop_dl/crawlers/inporn.py+++ b/cyberdrop_dl/crawlers/inporn.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass InPornCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/invision/bellazon.py b/cyberdrop_dl/crawlers/invision/bellazon.pyindex 127198373..6a82ae75e 100644--- a/cyberdrop_dl/crawlers/invision/bellazon.py+++ b/cyberdrop_dl/crawlers/invision/bellazon.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom ._invision import InvisionCrawlerdiff --git a/cyberdrop_dl/crawlers/jpg5.py b/cyberdrop_dl/crawlers/jpg5.pyindex 345d8c648..52ff90ee7 100644--- a/cyberdrop_dl/crawlers/jpg5.py+++ b/cyberdrop_dl/crawlers/jpg5.py@@ -3,8 +3,8 @@ from __future__ import annotationsimport base64from typing import TYPE_CHECKING, ClassVar, Final-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem-from cyberdrop_dl.utils.utilities import error_handling_wrapper, xor_decrypt+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import error_handling_wrapper, xor_decryptfrom ._chevereto import CheveretoCrawlerdiff --git a/cyberdrop_dl/crawlers/kemono.py b/cyberdrop_dl/crawlers/kemono.pyindex 0c95d0e23..14d883553 100644--- a/cyberdrop_dl/crawlers/kemono.py+++ b/cyberdrop_dl/crawlers/kemono.py@@ -13,20 +13,19 @@ from typing import TYPE_CHECKING, Annotated, Any, ClassVar, Concatenate, Literalfrom pydantic import BeforeValidator, Fieldfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import NoExtensionError, ScrapeErrorfrom cyberdrop_dl.models import AliasModelfrom cyberdrop_dl.models.validators import falsy_as, falsy_as_none-from cyberdrop_dl.utils import css+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, remove_partsfrom cyberdrop_dl.utils.dates import to_timestamp-from cyberdrop_dl.utils.utilities import error_handling_wrapper, remove_partsif TYPE_CHECKING:from collections.abc import AsyncGenerator, Callable, Coroutine, Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_P = ParamSpec("_P")diff --git a/cyberdrop_dl/crawlers/koofr.py b/cyberdrop_dl/crawlers/koofr.pyindex f4b26f006..add316a2b 100644--- a/cyberdrop_dl/crawlers/koofr.py+++ b/cyberdrop_dl/crawlers/koofr.py@@ -6,9 +6,9 @@ from typing import Any, ClassVar, Literalfrom pydantic import dataclassesfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.exceptions import DownloadError, PasswordProtectedError, ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import error_handling_wrapper_APP_URL = AbsoluteHttpURL("https://app.koofr.net")_APP_LINKS = _APP_URL / "api/v2/public/links"diff --git a/cyberdrop_dl/crawlers/leakedzone.py b/cyberdrop_dl/crawlers/leakedzone.pyindex 7f151708e..db966b49f 100644--- a/cyberdrop_dl/crawlers/leakedzone.py+++ b/cyberdrop_dl/crawlers/leakedzone.py@@ -7,14 +7,13 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.compat import IntEnumfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass PostType(IntEnum):diff --git a/cyberdrop_dl/crawlers/luscious.py b/cyberdrop_dl/crawlers/luscious.pyindex 6dd457037..f2cfa9973 100644--- a/cyberdrop_dl/crawlers/luscious.py+++ b/cyberdrop_dl/crawlers/luscious.py@@ -5,14 +5,14 @@ import jsonfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemGRAPHQL_URL = AbsoluteHttpURL("https://members.luscious.net/graphql/nobatch/")diff --git a/cyberdrop_dl/crawlers/luxuretv.py b/cyberdrop_dl/crawlers/luxuretv.pyindex 8b6f47aaa..0cea9c6a1 100644--- a/cyberdrop_dl/crawlers/luxuretv.py+++ b/cyberdrop_dl/crawlers/luxuretv.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/masahub.py b/cyberdrop_dl/crawlers/masahub.pyindex a10dfe16a..1853d3c3b 100644--- a/cyberdrop_dl/crawlers/masahub.py+++ b/cyberdrop_dl/crawlers/masahub.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/mediafire.py b/cyberdrop_dl/crawlers/mediafire.pyindex 1400a0398..6543a83f2 100644--- a/cyberdrop_dl/crawlers/mediafire.py+++ b/cyberdrop_dl/crawlers/mediafire.py@@ -9,17 +9,16 @@ from http import HTTPStatusfrom typing import TYPE_CHECKING, Any, ClassVar, Literalfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import DictDataclass, error_handling_wrapper, is_blob_or_svg+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import DictDataclass, css, error_handling_wrapper, is_blob_or_svgif TYPE_CHECKING:from collections.abc import AsyncGeneratorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem@dataclasses.dataclass(slots=True, frozen=True)diff --git a/cyberdrop_dl/crawlers/mega_nz.py b/cyberdrop_dl/crawlers/mega_nz.pyindex a3f1b644d..5d4aab99d 100644--- a/cyberdrop_dl/crawlers/mega_nz.py+++ b/cyberdrop_dl/crawlers/mega_nz.py@@ -16,15 +16,15 @@ from mega.data_structures import Cryptofrom typing_extensions import overridefrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.downloader.mega_nz import MegaDownloaderfrom cyberdrop_dl.exceptions import LoginError, ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from mega.filesystem import FileSystem- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass MegaNzCrawler(Crawler, db_path="path_qs_frag"):diff --git a/cyberdrop_dl/crawlers/megacloud.py b/cyberdrop_dl/crawlers/megacloud.pyindex 1b8bca48e..7192a9944 100644--- a/cyberdrop_dl/crawlers/megacloud.py+++ b/cyberdrop_dl/crawlers/megacloud.py@@ -5,13 +5,13 @@ import refrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Subtitle-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.mediaprops import Subtitle+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_PRIMARY_URL = AbsoluteHttpURL("https://megacloud.blog")diff --git a/cyberdrop_dl/crawlers/missav.py b/cyberdrop_dl/crawlers/missav.pyindex 05d2cd528..a1ca872b0 100644--- a/cyberdrop_dl/crawlers/missav.py+++ b/cyberdrop_dl/crawlers/missav.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:from bs4 import BeautifulSoup, Tag- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_M3U8_SERVER = AbsoluteHttpURL("https://surrit.com/")diff --git a/cyberdrop_dl/crawlers/mixdrop.py b/cyberdrop_dl/crawlers/mixdrop.pyindex 3cd3b40d8..5f3e0104c 100644--- a/cyberdrop_dl/crawlers/mixdrop.py+++ b/cyberdrop_dl/crawlers/mixdrop.py@@ -4,14 +4,13 @@ import asynciofrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, js_unpacker-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, js_unpackerif TYPE_CHECKING:from collections.abc import Generator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass MixDropCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/motherless.py b/cyberdrop_dl/crawlers/motherless.pyindex 639120366..a260a3385 100644--- a/cyberdrop_dl/crawlers/motherless.py+++ b/cyberdrop_dl/crawlers/motherless.py@@ -3,15 +3,14 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVar, Literal, NamedTuplefrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://motherless.com")diff --git a/cyberdrop_dl/crawlers/mydesi.py b/cyberdrop_dl/crawlers/mydesi.pyindex ff8754dca..acb4b5e38 100644--- a/cyberdrop_dl/crawlers/mydesi.py+++ b/cyberdrop_dl/crawlers/mydesi.py@@ -4,17 +4,16 @@ import itertoolsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from collections.abc import Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass MyDesiCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/nekohouse.py b/cyberdrop_dl/crawlers/nekohouse.pyindex 6aa868e1d..960cf8708 100644--- a/cyberdrop_dl/crawlers/nekohouse.py+++ b/cyberdrop_dl/crawlers/nekohouse.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .kemono import KemonoBaseCrawlerdiff --git a/cyberdrop_dl/crawlers/nhentai.py b/cyberdrop_dl/crawlers/nhentai.pyindex 7d91c8c73..415f226df 100644--- a/cyberdrop_dl/crawlers/nhentai.py+++ b/cyberdrop_dl/crawlers/nhentai.py@@ -4,15 +4,14 @@ import randomfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import LoginError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from collections.abc import Generator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/noodle_magazine.py b/cyberdrop_dl/crawlers/noodle_magazine.pyindex 3449a7965..e20cfe79e 100644--- a/cyberdrop_dl/crawlers/noodle_magazine.py+++ b/cyberdrop_dl/crawlers/noodle_magazine.py@@ -6,18 +6,17 @@ import jsonfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between, parse_url+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, parse_urlif TYPE_CHECKING:from collections.abc import Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/nsfw_xxx.py b/cyberdrop_dl/crawlers/nsfw_xxx.pyindex 21d8c39e5..be4e6f1ba 100644--- a/cyberdrop_dl/crawlers/nsfw_xxx.py+++ b/cyberdrop_dl/crawlers/nsfw_xxx.py@@ -3,14 +3,14 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_BASE_QUERY = "nsfw[]=0&nsfw[]=1&nsfw[]=2&nsfw[]=3&nsfw[]=4"_TYPES_QUERY = "types[]=image&types[]=video&types[]=gallery"diff --git a/cyberdrop_dl/crawlers/nudostartv.py b/cyberdrop_dl/crawlers/nudostartv.pyindex 5ce74d2ac..f15f4ca88 100644--- a/cyberdrop_dl/crawlers/nudostartv.py+++ b/cyberdrop_dl/crawlers/nudostartv.py@@ -3,13 +3,12 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemIMAGE_SELECTOR = "div[class=block-video] a img"CONTENT_SELECTOR = "div[id=list_videos_common_videos_list_items] div a"diff --git a/cyberdrop_dl/crawlers/odnoklassniki.py b/cyberdrop_dl/crawlers/odnoklassniki.pyindex 034702b12..e525ed9de 100644--- a/cyberdrop_dl/crawlers/odnoklassniki.py+++ b/cyberdrop_dl/crawlers/odnoklassniki.py@@ -4,16 +4,15 @@ import refrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, json-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, jsonif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_find_video_ids = re.compile("/video/(\\d+)").finditerdiff --git a/cyberdrop_dl/crawlers/omegascans.py b/cyberdrop_dl/crawlers/omegascans.pyindex 0af53d89d..130cd948c 100644--- a/cyberdrop_dl/crawlers/omegascans.py+++ b/cyberdrop_dl/crawlers/omegascans.py@@ -4,13 +4,12 @@ import itertoolsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemDATE_SELECTOR = 'h2[class="font-semibold font-sans text-muted-foreground text-xs"]'diff --git a/cyberdrop_dl/crawlers/onedrive.py b/cyberdrop_dl/crawlers/onedrive.pyindex 927bb5011..c083c48d0 100644--- a/cyberdrop_dl/crawlers/onedrive.py+++ b/cyberdrop_dl/crawlers/onedrive.py@@ -10,13 +10,13 @@ from functools import partialfrom typing import TYPE_CHECKING, Any, ClassVar, Selffrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperfrom cyberdrop_dl.utils.dates import to_timestamp-from cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemAPI_ENTRYPOINT = AbsoluteHttpURL("https://api.onedrive.com/v1.0/drives/")diff --git a/cyberdrop_dl/crawlers/onepace.py b/cyberdrop_dl/crawlers/onepace.pyindex e8d073530..740f1db15 100644--- a/cyberdrop_dl/crawlers/onepace.py+++ b/cyberdrop_dl/crawlers/onepace.py@@ -6,14 +6,13 @@ from pydantic import dataclassesfrom cyberdrop_dl import envfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import next_js-from cyberdrop_dl.utils.utilities import DictDataclass, error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper, next_jsif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem@dataclasses.dataclass(slots=True)diff --git a/cyberdrop_dl/crawlers/owncloud.py b/cyberdrop_dl/crawlers/owncloud.pyindex 770d95c0a..f61abfacc 100644--- a/cyberdrop_dl/crawlers/owncloud.py+++ b/cyberdrop_dl/crawlers/owncloud.py@@ -5,11 +5,10 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.utils import dates, webdav-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.utils import dates, error_handling_wrapper, webdavif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemclass OwnCloudCrawler(Crawler, is_generic=True):diff --git a/cyberdrop_dl/crawlers/pcloud.py b/cyberdrop_dl/crawlers/pcloud.pyindex 9b0d54611..b716f492d 100644--- a/cyberdrop_dl/crawlers/pcloud.py+++ b/cyberdrop_dl/crawlers/pcloud.py@@ -8,15 +8,14 @@ from typing import TYPE_CHECKING, Any, ClassVar, Literal, castfrom pydantic import TypeAdapterfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import dates-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import dates, error_handling_wrapperif TYPE_CHECKING:from collections.abc import Sequence- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_EU_API_URL = AbsoluteHttpURL("https://eapi.pcloud.com")diff --git a/cyberdrop_dl/crawlers/pimp_bunny.py b/cyberdrop_dl/crawlers/pimp_bunny.pyindex 2c77ed1b8..c20ae156e 100644--- a/cyberdrop_dl/crawlers/pimp_bunny.py+++ b/cyberdrop_dl/crawlers/pimp_bunny.py@@ -5,12 +5,12 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers._kvs import extract_kvs_videofrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures import AbsoluteHttpURL, Resolution-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.mediaprops import Resolution+ from cyberdrop_dl.url_objects import ScrapeItem_PER_PAGE: int = 1000diff --git a/cyberdrop_dl/crawlers/pimpandhost.py b/cyberdrop_dl/crawlers/pimpandhost.pyindex f317b6f4e..da9af00db 100644--- a/cyberdrop_dl/crawlers/pimpandhost.py+++ b/cyberdrop_dl/crawlers/pimpandhost.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemALBUM_TITLE_SELECTOR = "span[class=author-header__album-name]"DATE_SELECTOR = "span[class=date-time]"diff --git a/cyberdrop_dl/crawlers/pixeldrain.py b/cyberdrop_dl/crawlers/pixeldrain.pyindex e8b797189..4c001bd0f 100644--- a/cyberdrop_dl/crawlers/pixeldrain.py+++ b/cyberdrop_dl/crawlers/pixeldrain.py@@ -8,13 +8,13 @@ from pydantic import BaseModelfrom cyberdrop_dl import envfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedDomains, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from cyberdrop_dl.clients.response import AbstractResponse- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_PRIMARY_URL = AbsoluteHttpURL("https://pixeldrain.com")diff --git a/cyberdrop_dl/crawlers/pixhost.py b/cyberdrop_dl/crawlers/pixhost.pyindex 5de0162b4..f142807a8 100644--- a/cyberdrop_dl/crawlers/pixhost.py+++ b/cyberdrop_dl/crawlers/pixhost.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/pkmncards.py b/cyberdrop_dl/crawlers/pkmncards.pyindex 86e3ad527..41f31a8c7 100644--- a/cyberdrop_dl/crawlers/pkmncards.py+++ b/cyberdrop_dl/crawlers/pkmncards.py@@ -8,16 +8,15 @@ from datetime import datetimefrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperfrom cyberdrop_dl.utils.dates import TimeStamp, to_timestamp-from cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:from bs4 import Tag- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/pmvhaven.py b/cyberdrop_dl/crawlers/pmvhaven.pyindex b06052e3b..f15511393 100644--- a/cyberdrop_dl/crawlers/pmvhaven.py+++ b/cyberdrop_dl/crawlers/pmvhaven.py@@ -6,16 +6,15 @@ import itertoolsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import nuxt-from cyberdrop_dl.utils.utilities import DictDataclass, error_handling_wrapper+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper, nuxtif TYPE_CHECKING:from collections.abc import AsyncGenerator, Generator, Iterablefrom typing import Any- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://pmvhaven.com")diff --git a/cyberdrop_dl/crawlers/pornhub.py b/cyberdrop_dl/crawlers/pornhub.pyindex e8e4da88e..a503440e7 100644--- a/cyberdrop_dl/crawlers/pornhub.py+++ b/cyberdrop_dl/crawlers/pornhub.py@@ -7,15 +7,14 @@ from http import HTTPStatusfrom typing import TYPE_CHECKING, Any, ClassVar, Literal, NamedTuple, TypedDictfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://www.pornhub.com")MP4_NOT_AVAILABLE_SINCE = datetime.datetime(2025, 6, 25).timestamp()diff --git a/cyberdrop_dl/crawlers/pornpics.py b/cyberdrop_dl/crawlers/pornpics.pyindex b3481b0b2..5c5758f41 100644--- a/cyberdrop_dl/crawlers/pornpics.py+++ b/cyberdrop_dl/crawlers/pornpics.py@@ -4,16 +4,15 @@ import itertoolsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGeneratorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemCOLLECTION_PARTS = "search", "channel", "pornstar", "tag", "category"IMAGE_SELECTOR = "div#main a.rel-link"diff --git a/cyberdrop_dl/crawlers/porntrex.py b/cyberdrop_dl/crawlers/porntrex.pyindex 7b2ebefa1..47ab2c6b9 100644--- a/cyberdrop_dl/crawlers/porntrex.py+++ b/cyberdrop_dl/crawlers/porntrex.py@@ -5,13 +5,12 @@ from typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._kvs import extract_kvs_videofrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/pornzog.py b/cyberdrop_dl/crawlers/pornzog.pyindex e4553dfe4..9506baa73 100644--- a/cyberdrop_dl/crawlers/pornzog.py+++ b/cyberdrop_dl/crawlers/pornzog.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/postimg.py b/cyberdrop_dl/crawlers/postimg.pyindex 2e4df3898..6f8a6fe43 100644--- a/cyberdrop_dl/crawlers/postimg.py+++ b/cyberdrop_dl/crawlers/postimg.py@@ -4,12 +4,11 @@ import itertoolsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass PostImgCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/ranoz.py b/cyberdrop_dl/crawlers/ranoz.pyindex 5b0c280a3..a411b4bf2 100644--- a/cyberdrop_dl/crawlers/ranoz.py+++ b/cyberdrop_dl/crawlers/ranoz.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVar, NamedTuplefrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass File(NamedTuple):diff --git a/cyberdrop_dl/crawlers/realbooru.py b/cyberdrop_dl/crawlers/realbooru.pyindex b43eae2e5..d18daa9b7 100644--- a/cyberdrop_dl/crawlers/realbooru.py+++ b/cyberdrop_dl/crawlers/realbooru.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/realdebrid.py b/cyberdrop_dl/crawlers/realdebrid.pyindex 1e39092df..b5d66a3d4 100644--- a/cyberdrop_dl/crawlers/realdebrid.py+++ b/cyberdrop_dl/crawlers/realdebrid.py@@ -7,12 +7,12 @@ import refrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_PRIMARY_URL = AbsoluteHttpURL("https://real-debrid.com")_API_ENTRYPOINT = AbsoluteHttpURL("https://api.real-debrid.com/rest/1.0")diff --git a/cyberdrop_dl/crawlers/redgifs.py b/cyberdrop_dl/crawlers/redgifs.pyindex 3f8989cbe..05e1bfe13 100644--- a/cyberdrop_dl/crawlers/redgifs.py+++ b/cyberdrop_dl/crawlers/redgifs.py@@ -4,15 +4,15 @@ import dataclassesfrom typing import TYPE_CHECKING, Any, ClassVar, Finalfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator, Generatorfrom cyberdrop_dl.clients.response import AbstractResponse- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem# Primary URL needs `www.` to prevent redirectPRIMARY_URL = AbsoluteHttpURL("https://www.redgifs.com/")diff --git a/cyberdrop_dl/crawlers/rule34vault.py b/cyberdrop_dl/crawlers/rule34vault.pyindex 7b2efb567..6ef96b671 100644--- a/cyberdrop_dl/crawlers/rule34vault.py+++ b/cyberdrop_dl/crawlers/rule34vault.py@@ -4,12 +4,11 @@ import itertoolsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/rule34video.py b/cyberdrop_dl/crawlers/rule34video.pyindex 0ab16091b..168075c84 100644--- a/cyberdrop_dl/crawlers/rule34video.py+++ b/cyberdrop_dl/crawlers/rule34video.py@@ -3,13 +3,12 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._kvs import KernelVideoSharingCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/rule34xxx.py b/cyberdrop_dl/crawlers/rule34xxx.pyindex f13935de9..1135d7987 100644--- a/cyberdrop_dl/crawlers/rule34xxx.py+++ b/cyberdrop_dl/crawlers/rule34xxx.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://rule34.xxx")diff --git a/cyberdrop_dl/crawlers/rule34xyz.py b/cyberdrop_dl/crawlers/rule34xyz.pyindex 50477bd83..335e9aeb4 100644--- a/cyberdrop_dl/crawlers/rule34xyz.py+++ b/cyberdrop_dl/crawlers/rule34xyz.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers.rule34vault import Rule34VaultCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLPRIMARY_URL = AbsoluteHttpURL("https://rule34.xyz")diff --git a/cyberdrop_dl/crawlers/rumble.py b/cyberdrop_dl/crawlers/rumble.pyindex 27e9030e8..e70ebf9b1 100644--- a/cyberdrop_dl/crawlers/rumble.py+++ b/cyberdrop_dl/crawlers/rumble.py@@ -7,16 +7,15 @@ from typing import TYPE_CHECKING, Any, ClassVar, NamedTuplefrom cyberdrop_dl import aiofrom cyberdrop_dl.compat import IntEnumfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution, Subtitle-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import DownloadError, ScrapeError-from cyberdrop_dl.utils import css, m3u8-from cyberdrop_dl.utils.utilities import error_handling_wrapper, parse_url+from cyberdrop_dl.mediaprops import Resolution, Subtitle+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, m3u8, parse_urlif TYPE_CHECKING:from collections.abc import Generator, Iterable- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass LiveStatus(IntEnum):diff --git a/cyberdrop_dl/crawlers/scrolller.py b/cyberdrop_dl/crawlers/scrolller.pyindex 8b35239cf..d14f65281 100644--- a/cyberdrop_dl/crawlers/scrolller.py+++ b/cyberdrop_dl/crawlers/scrolller.py@@ -4,11 +4,11 @@ import jsonfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemDEFAULT_QUERY = """query SubredditQuery(diff --git a/cyberdrop_dl/crawlers/send_now.py b/cyberdrop_dl/crawlers/send_now.pyindex ace6272fc..15c8b2280 100644--- a/cyberdrop_dl/crawlers/send_now.py+++ b/cyberdrop_dl/crawlers/send_now.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://send.now/")diff --git a/cyberdrop_dl/crawlers/sendvid.py b/cyberdrop_dl/crawlers/sendvid.pyindex 9ed6ea9fc..5a3066c09 100644--- a/cyberdrop_dl/crawlers/sendvid.py+++ b/cyberdrop_dl/crawlers/sendvid.py@@ -3,13 +3,12 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, remove_parts+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, remove_partsif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://sendvid.com/")VIDEO_SRC_SELECTOR = "video > source#video_source"diff --git a/cyberdrop_dl/crawlers/sex_dot_com.py b/cyberdrop_dl/crawlers/sex_dot_com.pyindex 1246cb13a..34397abd5 100644--- a/cyberdrop_dl/crawlers/sex_dot_com.py+++ b/cyberdrop_dl/crawlers/sex_dot_com.py@@ -4,13 +4,13 @@ import itertoolsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://sex.com")diff --git a/cyberdrop_dl/crawlers/spankbang.py b/cyberdrop_dl/crawlers/spankbang.pyindex b7604ab70..8d1058b7e 100644--- a/cyberdrop_dl/crawlers/spankbang.py+++ b/cyberdrop_dl/crawlers/spankbang.py@@ -4,18 +4,17 @@ import dataclassesfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, json-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, jsonif TYPE_CHECKING:from collections.abc import Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/streamable.py b/cyberdrop_dl/crawlers/streamable.pyindex 4f62f6366..e112701d3 100644--- a/cyberdrop_dl/crawlers/streamable.py+++ b/cyberdrop_dl/crawlers/streamable.py@@ -4,12 +4,12 @@ import jsonfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://streamable.com")diff --git a/cyberdrop_dl/crawlers/streamtape.py b/cyberdrop_dl/crawlers/streamtape.pyindex e1804983b..9ee95d119 100644--- a/cyberdrop_dl/crawlers/streamtape.py+++ b/cyberdrop_dl/crawlers/streamtape.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between, parse_url+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, open_graph, parse_urlif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/tabootube.py b/cyberdrop_dl/crawlers/tabootube.pyindex 84c0e09df..26d5143ca 100644--- a/cyberdrop_dl/crawlers/tabootube.py+++ b/cyberdrop_dl/crawlers/tabootube.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._kvs import KernelVideoSharingCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPathsdiff --git a/cyberdrop_dl/crawlers/thisvid.py b/cyberdrop_dl/crawlers/thisvid.pyindex 452efcd85..66d807114 100644--- a/cyberdrop_dl/crawlers/thisvid.py+++ b/cyberdrop_dl/crawlers/thisvid.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._kvs import KernelVideoSharingCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass ThisVidCrawler(KernelVideoSharingCrawler):diff --git a/cyberdrop_dl/crawlers/thothub.py b/cyberdrop_dl/crawlers/thothub.pyindex 807d51974..ae04b9abd 100644--- a/cyberdrop_dl/crawlers/thothub.py+++ b/cyberdrop_dl/crawlers/thothub.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._kvs import KernelVideoSharingCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass ThotHubCrawler(KernelVideoSharingCrawler):diff --git a/cyberdrop_dl/crawlers/tiktok.py b/cyberdrop_dl/crawlers/tiktok.pyindex a821901b3..172f1fd0c 100644--- a/cyberdrop_dl/crawlers/tiktok.py+++ b/cyberdrop_dl/crawlers/tiktok.py@@ -5,14 +5,14 @@ import dataclassesfrom typing import TYPE_CHECKING, Any, ClassVar, Selffrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, MediaItemfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import DictDataclass, error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItem+from cyberdrop_dl.utils import DictDataclass, error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator, Mapping- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemfrom cyberdrop_dl.utils import m3u8_PRIMARY_URL = AbsoluteHttpURL("https://www.tiktok.com/")diff --git a/cyberdrop_dl/crawlers/tnaflix.py b/cyberdrop_dl/crawlers/tnaflix.pyindex d6fea4b0d..3aa18cf60 100644--- a/cyberdrop_dl/crawlers/tnaflix.py+++ b/cyberdrop_dl/crawlers/tnaflix.py@@ -3,15 +3,14 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVar, NamedTuplefrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://www.tnaflix.com")diff --git a/cyberdrop_dl/crawlers/tokyomotion.py b/cyberdrop_dl/crawlers/tokyomotion.pyindex ff1e75283..e167458f8 100644--- a/cyberdrop_dl/crawlers/tokyomotion.py+++ b/cyberdrop_dl/crawlers/tokyomotion.py@@ -4,17 +4,16 @@ from typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl import signaturefrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:from collections.abc import AsyncIteratorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/toonily.py b/cyberdrop_dl/crawlers/toonily.pyindex d5ebc245d..9fea6e339 100644--- a/cyberdrop_dl/crawlers/toonily.py+++ b/cyberdrop_dl/crawlers/toonily.py@@ -3,9 +3,8 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import FILE_HOST_PROFILE, AbsoluteHttpURL, ScrapeItem-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import FILE_HOST_PROFILE, AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import css, error_handling_wrapperclass Selector:diff --git a/cyberdrop_dl/crawlers/tranny_one.py b/cyberdrop_dl/crawlers/tranny_one.pyindex 180eb278c..b39502c9e 100644--- a/cyberdrop_dl/crawlers/tranny_one.py+++ b/cyberdrop_dl/crawlers/tranny_one.py@@ -4,12 +4,11 @@ import itertoolsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/transfer_it.py b/cyberdrop_dl/crawlers/transfer_it.pyindex 6adb9606e..52b4e866b 100644--- a/cyberdrop_dl/crawlers/transfer_it.py+++ b/cyberdrop_dl/crawlers/transfer_it.py@@ -5,14 +5,14 @@ from typing import TYPE_CHECKING, ClassVarfrom mega.transfer_it import TransferItClientfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from mega.data_structures import Node+ from mega import Nodefrom mega.filesystem import FileSystem- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass TransferItCrawler(Crawler, db_path="path_qs_frag"):diff --git a/cyberdrop_dl/crawlers/transflix.py b/cyberdrop_dl/crawlers/transflix.pyindex de80170e6..5d83a7fa1 100644--- a/cyberdrop_dl/crawlers/transflix.py+++ b/cyberdrop_dl/crawlers/transflix.py@@ -4,12 +4,11 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_UNIX_TIMESTAMP_LENGTH: int = 10diff --git a/cyberdrop_dl/crawlers/tubepornclassic.py b/cyberdrop_dl/crawlers/tubepornclassic.pyindex 9b4f462ed..396b9f5d5 100644--- a/cyberdrop_dl/crawlers/tubepornclassic.py+++ b/cyberdrop_dl/crawlers/tubepornclassic.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass TubePornClassicCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/turbovid.py b/cyberdrop_dl/crawlers/turbovid.pyindex ebf85be11..c8967558d 100644--- a/cyberdrop_dl/crawlers/turbovid.py+++ b/cyberdrop_dl/crawlers/turbovid.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/twitch.py b/cyberdrop_dl/crawlers/twitch.pyindex fb54dd264..0f44570c3 100644--- a/cyberdrop_dl/crawlers/twitch.py+++ b/cyberdrop_dl/crawlers/twitch.py@@ -6,15 +6,15 @@ import jsonfrom typing import TYPE_CHECKING, Any, ClassVar, Final, Literalfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper, parse_url+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapper, parse_urlif TYPE_CHECKING:from collections.abc import Generator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemfrom cyberdrop_dl.utils import m3u8from cyberdrop_dl.utils.m3u8 import M3U8diff --git a/cyberdrop_dl/crawlers/twitter.py b/cyberdrop_dl/crawlers/twitter.pyindex 6315dba4f..a2730ad04 100644--- a/cyberdrop_dl/crawlers/twitter.py+++ b/cyberdrop_dl/crawlers/twitter.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_API_URL = AbsoluteHttpURL("https://api.fxtwitter.com")diff --git a/cyberdrop_dl/crawlers/twitter_images.py b/cyberdrop_dl/crawlers/twitter_images.pyindex 012898966..1c81ca05f 100644--- a/cyberdrop_dl/crawlers/twitter_images.py+++ b/cyberdrop_dl/crawlers/twitter_images.py@@ -4,10 +4,10 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, MediaItem+from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItemif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemfrom cyberdrop_dl.utils import m3u8diff --git a/cyberdrop_dl/crawlers/twpornstars.py b/cyberdrop_dl/crawlers/twpornstars.pyindex 398bbffde..f0eb73bf4 100644--- a/cyberdrop_dl/crawlers/twpornstars.py+++ b/cyberdrop_dl/crawlers/twpornstars.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.twitter_images import TwimgCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedDomains- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/txxx.py b/cyberdrop_dl/crawlers/txxx.pyindex edb5303ef..cf70733b6 100644--- a/cyberdrop_dl/crawlers/txxx.py+++ b/cyberdrop_dl/crawlers/txxx.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass TXXXCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/upload_ee.py b/cyberdrop_dl/crawlers/upload_ee.pyindex db5dd18ea..ecc4a2221 100644--- a/cyberdrop_dl/crawlers/upload_ee.py+++ b/cyberdrop_dl/crawlers/upload_ee.py@@ -3,12 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass UploadEECrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/upornia.py b/cyberdrop_dl/crawlers/upornia.pyindex 8f90cb537..33a07ec47 100644--- a/cyberdrop_dl/crawlers/upornia.py+++ b/cyberdrop_dl/crawlers/upornia.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass UPorniaCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/vbulletin/_vbulletin.py b/cyberdrop_dl/crawlers/vbulletin/_vbulletin.pyindex b8348c2aa..6e0eb0306 100644--- a/cyberdrop_dl/crawlers/vbulletin/_vbulletin.py+++ b/cyberdrop_dl/crawlers/vbulletin/_vbulletin.py@@ -14,7 +14,7 @@ if TYPE_CHECKING:from cyberdrop_dl.crawlers._forum import Threadfrom cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemN_POSTS_PER_PAGE = 15diff --git a/cyberdrop_dl/crawlers/vbulletin/vipergirls.py b/cyberdrop_dl/crawlers/vbulletin/vipergirls.pyindex 6a9b8e709..610541044 100644--- a/cyberdrop_dl/crawlers/vbulletin/vipergirls.py+++ b/cyberdrop_dl/crawlers/vbulletin/vipergirls.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers.vbulletin._vbulletin import vBulletinCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass ViperGirlsCrawler(vBulletinCrawler):diff --git a/cyberdrop_dl/crawlers/vidara.py b/cyberdrop_dl/crawlers/vidara.pyindex 3ca57a640..1ceb66935 100644--- a/cyberdrop_dl/crawlers/vidara.py+++ b/cyberdrop_dl/crawlers/vidara.py@@ -4,11 +4,11 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass VidaraCrawler(Crawler, db_path="path_qs_frag"):diff --git a/cyberdrop_dl/crawlers/vipr_dot_im.py b/cyberdrop_dl/crawlers/vipr_dot_im.pyindex b06b2b181..cddf9ef8d 100644--- a/cyberdrop_dl/crawlers/vipr_dot_im.py+++ b/cyberdrop_dl/crawlers/vipr_dot_im.py@@ -4,12 +4,11 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass ViprImCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/vjav.py b/cyberdrop_dl/crawlers/vjav.pyindex 48fd8c66c..b993d3067 100644--- a/cyberdrop_dl/crawlers/vjav.py+++ b/cyberdrop_dl/crawlers/vjav.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass VJavCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/voe_sx.py b/cyberdrop_dl/crawlers/voe_sx.pyindex e849edd8e..ebffa1889 100644--- a/cyberdrop_dl/crawlers/voe_sx.py+++ b/cyberdrop_dl/crawlers/voe_sx.py@@ -9,18 +9,17 @@ from pathlib import Pathfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths, auto_task_id-from cyberdrop_dl.data_structures import AbsoluteHttpURL-from cyberdrop_dl.data_structures.mediaprops import Resolution, Subtitlefrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import m3u8, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper, parse_url+from cyberdrop_dl.mediaprops import Resolution, Subtitle+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapper, m3u8, open_graph, parse_urlif TYPE_CHECKING:from collections.abc import Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_find_js_redirect = re.compile(diff --git a/cyberdrop_dl/crawlers/voyeurhit.py b/cyberdrop_dl/crawlers/voyeurhit.pyindex 14598773d..87e7a3481 100644--- a/cyberdrop_dl/crawlers/voyeurhit.py+++ b/cyberdrop_dl/crawlers/voyeurhit.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass VoyeurHitCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/vsco.py b/cyberdrop_dl/crawlers/vsco.pyindex c1f5874b0..3a3a97d0a 100644--- a/cyberdrop_dl/crawlers/vsco.py+++ b/cyberdrop_dl/crawlers/vsco.py@@ -6,14 +6,13 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom pydantic.alias_generators import to_snakefrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass VSCOCrawler(Crawler):diff --git a/cyberdrop_dl/crawlers/vxxx.py b/cyberdrop_dl/crawlers/vxxx.pyindex 1fdec950d..e923a3f27 100644--- a/cyberdrop_dl/crawlers/vxxx.py+++ b/cyberdrop_dl/crawlers/vxxx.py@@ -3,11 +3,11 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass VXXXCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/wetransfer.py b/cyberdrop_dl/crawlers/wetransfer.pyindex 33588bdd9..3dd55d5ea 100644--- a/cyberdrop_dl/crawlers/wetransfer.py+++ b/cyberdrop_dl/crawlers/wetransfer.py@@ -3,13 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperif TYPE_CHECKING:from cyberdrop_dl.clients.response import AbstractResponse- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_PRIMARY_URL = AbsoluteHttpURL("https://wetransfer.com/")_API_ENTRYPOINT = _PRIMARY_URL / "api/v4/transfers"diff --git a/cyberdrop_dl/crawlers/wordpress/_wordpress.py b/cyberdrop_dl/crawlers/wordpress/_wordpress.pyindex 61a01d851..1b00dcfdf 100644--- a/cyberdrop_dl/crawlers/wordpress/_wordpress.py+++ b/cyberdrop_dl/crawlers/wordpress/_wordpress.py@@ -17,11 +17,10 @@ from bs4 import BeautifulSoupfrom pydantic import BaseModelfrom cyberdrop_dl.crawlers.crawler import Crawler-from cyberdrop_dl.data_structures.url_objects import QueryDatetimeRangefrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, open_graph+from cyberdrop_dl.url_objects import QueryDatetimeRange+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphfrom cyberdrop_dl.utils.dates import to_timestamp-from cyberdrop_dl.utils.utilities import error_handling_wrapperfrom .models import HTML, Category, CategorySequence, ColletionType, Post, PostSequence, Tag, TagSequence@@ -31,7 +30,7 @@ if TYPE_CHECKING:from pydantic.type_adapter import TypeAdapterfrom cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem_ModelT = TypeVar("_ModelT", bound=BaseModel)_POST_PER_REQUEST = 100diff --git a/cyberdrop_dl/crawlers/wordpress/bestprettygirl.py b/cyberdrop_dl/crawlers/wordpress/bestprettygirl.pyindex fa758c3d0..16b959d76 100644--- a/cyberdrop_dl/crawlers/wordpress/bestprettygirl.py+++ b/cyberdrop_dl/crawlers/wordpress/bestprettygirl.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom ._wordpress import WordPressMediaCrawlerdiff --git a/cyberdrop_dl/crawlers/wordpress/everia.py b/cyberdrop_dl/crawlers/wordpress/everia.pyindex 70d59997e..28f5f5539 100644--- a/cyberdrop_dl/crawlers/wordpress/everia.py+++ b/cyberdrop_dl/crawlers/wordpress/everia.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom ._wordpress import WordPressHTMLCrawlerdiff --git a/cyberdrop_dl/crawlers/xasiat.py b/cyberdrop_dl/crawlers/xasiat.pyindex 276e27bf2..e3ce21aa4 100644--- a/cyberdrop_dl/crawlers/xasiat.py+++ b/cyberdrop_dl/crawlers/xasiat.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._kvs import KernelVideoSharingCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPathsdiff --git a/cyberdrop_dl/crawlers/xenforo/allporncomix.py b/cyberdrop_dl/crawlers/xenforo/allporncomix.pyindex 6012cc22c..55c12f429 100644--- a/cyberdrop_dl/crawlers/xenforo/allporncomix.py+++ b/cyberdrop_dl/crawlers/xenforo/allporncomix.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/celebforum.py b/cyberdrop_dl/crawlers/xenforo/celebforum.pyindex 8a2c1a0be..87e58991c 100644--- a/cyberdrop_dl/crawlers/xenforo/celebforum.py+++ b/cyberdrop_dl/crawlers/xenforo/celebforum.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/f95zone.py b/cyberdrop_dl/crawlers/xenforo/f95zone.pyindex 256b8bd49..c46bbf0f7 100644--- a/cyberdrop_dl/crawlers/xenforo/f95zone.py+++ b/cyberdrop_dl/crawlers/xenforo/f95zone.py@@ -2,8 +2,8 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapperfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/leakedmodels.py b/cyberdrop_dl/crawlers/xenforo/leakedmodels.pyindex 5b1b70900..c235e5a9a 100644--- a/cyberdrop_dl/crawlers/xenforo/leakedmodels.py+++ b/cyberdrop_dl/crawlers/xenforo/leakedmodels.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/nudostar.py b/cyberdrop_dl/crawlers/xenforo/nudostar.pyindex 96b394837..6fbbab6b2 100644--- a/cyberdrop_dl/crawlers/xenforo/nudostar.py+++ b/cyberdrop_dl/crawlers/xenforo/nudostar.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/simpcity.py b/cyberdrop_dl/crawlers/xenforo/simpcity.pyindex 0b2d44443..108f42299 100644--- a/cyberdrop_dl/crawlers/xenforo/simpcity.py+++ b/cyberdrop_dl/crawlers/xenforo/simpcity.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/socialmediagirls.py b/cyberdrop_dl/crawlers/xenforo/socialmediagirls.pyindex 4fe5f8c07..ae9989357 100644--- a/cyberdrop_dl/crawlers/xenforo/socialmediagirls.py+++ b/cyberdrop_dl/crawlers/xenforo/socialmediagirls.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/titsintops.py b/cyberdrop_dl/crawlers/xenforo/titsintops.pyindex 7d9ec398d..61eeceb97 100644--- a/cyberdrop_dl/crawlers/xenforo/titsintops.py+++ b/cyberdrop_dl/crawlers/xenforo/titsintops.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.utils import cssfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/xbunker.py b/cyberdrop_dl/crawlers/xenforo/xbunker.pyindex dd4320249..3b57bbbff 100644--- a/cyberdrop_dl/crawlers/xenforo/xbunker.py+++ b/cyberdrop_dl/crawlers/xenforo/xbunker.py@@ -2,7 +2,7 @@ from __future__ import annotationsfrom typing import ClassVar-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .xenforo import XenforoCrawlerdiff --git a/cyberdrop_dl/crawlers/xenforo/xenforo.py b/cyberdrop_dl/crawlers/xenforo/xenforo.pyindex 17f523ec1..c0f9fe15c 100644--- a/cyberdrop_dl/crawlers/xenforo/xenforo.py+++ b/cyberdrop_dl/crawlers/xenforo/xenforo.py@@ -17,16 +17,15 @@ from typing import TYPE_CHECKING, ClassVarfrom bs4 import BeautifulSoupfrom cyberdrop_dl.crawlers._forum import HTMLMessageBoardCrawler, MessageBoardSelectors, PostSelectors-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import LoginError, ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from collections.abc import Iterable, Sequencefrom cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+ from cyberdrop_dl.url_objects import AbsoluteHttpURLSelector = css.CssAttributeSelectordiff --git a/cyberdrop_dl/crawlers/xgroovy.py b/cyberdrop_dl/crawlers/xgroovy.pyindex 5006bbfad..46b78b27d 100644--- a/cyberdrop_dl/crawlers/xgroovy.py+++ b/cyberdrop_dl/crawlers/xgroovy.py@@ -3,14 +3,13 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers._fluid_player import FluidPlayerCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapper, open_graphif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import SupportedPaths- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selectors:diff --git a/cyberdrop_dl/crawlers/xhamster.py b/cyberdrop_dl/crawlers/xhamster.pyindex 97277973d..8a5242ab1 100644--- a/cyberdrop_dl/crawlers/xhamster.py+++ b/cyberdrop_dl/crawlers/xhamster.py@@ -9,15 +9,15 @@ from typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.compat import IntEnumfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.mediaprops import Resolution-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between, parse_url, xor_decrypt+from cyberdrop_dl.mediaprops import Resolution+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import error_handling_wrapper, get_text_between, parse_url, xor_decryptif TYPE_CHECKING:from collections.abc import Callable, Iterable- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_PRIMARY_URL = AbsoluteHttpURL("https://xhamster.com/")_ALLOW_AV1 = Falsediff --git a/cyberdrop_dl/crawlers/xmilf.py b/cyberdrop_dl/crawlers/xmilf.pyindex 9bbb8d3d8..7c947bc4d 100644--- a/cyberdrop_dl/crawlers/xmilf.py+++ b/cyberdrop_dl/crawlers/xmilf.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import ClassVarfrom cyberdrop_dl.crawlers._tubecorporate import TubeCorporateCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLclass XMilfCrawler(TubeCorporateCrawler):diff --git a/cyberdrop_dl/crawlers/xvideos.py b/cyberdrop_dl/crawlers/xvideos.pyindex b50d37dba..a18780fc4 100644--- a/cyberdrop_dl/crawlers/xvideos.py+++ b/cyberdrop_dl/crawlers/xvideos.py@@ -7,15 +7,14 @@ from collections import defaultdictfrom typing import TYPE_CHECKING, Any, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_betweenif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItem_ACCOUNTS = ("amateurs", "profiles", "channels", "pornstars")diff --git a/cyberdrop_dl/crawlers/xxxbunker.py b/cyberdrop_dl/crawlers/xxxbunker.pyindex 390d944a8..de533a693 100644--- a/cyberdrop_dl/crawlers/xxxbunker.py+++ b/cyberdrop_dl/crawlers/xxxbunker.py@@ -3,15 +3,14 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import ScrapeError-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, open_graphif TYPE_CHECKING:from bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemclass Selector:diff --git a/cyberdrop_dl/crawlers/yandex_disk.py b/cyberdrop_dl/crawlers/yandex_disk.pyindex 341b7bebf..0e8065a29 100644--- a/cyberdrop_dl/crawlers/yandex_disk.py+++ b/cyberdrop_dl/crawlers/yandex_disk.py@@ -7,18 +7,17 @@ from functools import cached_propertyfrom typing import TYPE_CHECKING, Any, ClassVar, Literal, Selffrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import DDOSGuardError, DownloadError, ScrapeError-from cyberdrop_dl.utils import css-from cyberdrop_dl.utils.utilities import error_handling_wrapper+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapperif TYPE_CHECKING:from collections.abc import AsyncGenerator, Generatorfrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItemfrom cyberdrop_dl.downloader.mega_nz import AnyDict+ from cyberdrop_dl.url_objects import ScrapeItemJS_SELECTOR = "script#store-prefetch"diff --git a/cyberdrop_dl/crawlers/youjizz.py b/cyberdrop_dl/crawlers/youjizz.pyindex 86dbdc9fe..8ccee28ab 100644--- a/cyberdrop_dl/crawlers/youjizz.py+++ b/cyberdrop_dl/crawlers/youjizz.py@@ -5,16 +5,15 @@ import jsonfrom typing import TYPE_CHECKING, Any, ClassVar, NamedTuplefrom cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL-from cyberdrop_dl.utils import css, open_graph-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_text_between+from cyberdrop_dl.url_objects import AbsoluteHttpURL+from cyberdrop_dl.utils import css, error_handling_wrapper, get_text_between, open_graphif TYPE_CHECKING:from collections.abc import Iterablefrom bs4 import BeautifulSoup- from cyberdrop_dl.data_structures.url_objects import ScrapeItem+ from cyberdrop_dl.url_objects import ScrapeItemPRIMARY_URL = AbsoluteHttpURL("https://www.youjizz.com/")JS_SELECTOR = "div#content > script:-soup-contains('var dataEncodings')"diff --git a/cyberdrop_dl/data_structures/__init__.py b/cyberdrop_dl/data_structures/__init__.pydeleted file mode 100644index cb344cf1e..000000000--- a/cyberdrop_dl/data_structures/__init__.py+++ /dev/null@@ -1,13 +0,0 @@-from .mediaprops import Codecs, Resolution-from .url_objects import AbsoluteHttpURL, HlsSegment, MediaItem, QueryDatetimeRange, ScrapeItem, ScrapeItemType--__all__ = [- "AbsoluteHttpURL",- "Codecs",- "HlsSegment",- "MediaItem",- "QueryDatetimeRange",- "Resolution",- "ScrapeItem",- "ScrapeItemType",-]diff --git a/cyberdrop_dl/database/tables/history.py b/cyberdrop_dl/database/tables/history.pyindex 0480a2b38..2d73d4669 100644--- a/cyberdrop_dl/database/tables/history.py+++ b/cyberdrop_dl/database/tables/history.py@@ -14,8 +14,8 @@ if TYPE_CHECKING:import aiosqlitefrom yarl import URL- from cyberdrop_dl.data_structures.url_objects import MediaItemfrom cyberdrop_dl.database import Database+ from cyberdrop_dl.url_objects import MediaItem_FETCH_MANY_SIZE: int = 1000diff --git a/cyberdrop_dl/downloader/downloader.py b/cyberdrop_dl/downloader/downloader.pyindex 550c38770..5f810300f 100644--- a/cyberdrop_dl/downloader/downloader.py+++ b/cyberdrop_dl/downloader/downloader.py@@ -10,7 +10,6 @@ from typing import TYPE_CHECKING, NamedTuplefrom aiohttp import ClientConnectorError, ClientError, ClientResponseErrorfrom cyberdrop_dl import aio, constants, ffmpeg, storage-from cyberdrop_dl.data_structures.url_objects import HlsSegment, MediaItemfrom cyberdrop_dl.exceptions import (DownloadError,DurationError,@@ -22,8 +21,8 @@ from cyberdrop_dl.exceptions import (SkipDownloadError,TooManyCrawlerErrors,)-from cyberdrop_dl.utils import dates-from cyberdrop_dl.utils.utilities import error_handling_wrapper, parse_url+from cyberdrop_dl.url_objects import HlsSegment, MediaItem+from cyberdrop_dl.utils import dates, error_handling_wrapper, parse_urllogger = logging.getLogger(__name__)diff --git a/cyberdrop_dl/downloader/mega_nz.py b/cyberdrop_dl/downloader/mega_nz.pyindex b552ca4ab..224f06b79 100644--- a/cyberdrop_dl/downloader/mega_nz.py+++ b/cyberdrop_dl/downloader/mega_nz.py@@ -15,9 +15,9 @@ if TYPE_CHECKING:from mega.data_structures import Cryptofrom yarl import URL- from cyberdrop_dl.data_structures.url_objects import MediaItemfrom cyberdrop_dl.managers.manager import Managerfrom cyberdrop_dl.progress import ProgressHook+ from cyberdrop_dl.url_objects import MediaItem@finaldiff --git a/cyberdrop_dl/exceptions.py b/cyberdrop_dl/exceptions.pyindex ab4841595..31cc823f3 100644--- a/cyberdrop_dl/exceptions.py+++ b/cyberdrop_dl/exceptions.py@@ -10,7 +10,7 @@ from yarl import URLif TYPE_CHECKING:from yaml import YAMLError- from cyberdrop_dl.data_structures.url_objects import MediaItem, ScrapeItem+ from cyberdrop_dl.url_objects import MediaItem, ScrapeItemdef _format_error(ui_failure: str, message: str) -> str:diff --git a/cyberdrop_dl/ffmpeg.py b/cyberdrop_dl/ffmpeg.pyindex 6f3503764..5972a21b5 100644--- a/cyberdrop_dl/ffmpeg.py+++ b/cyberdrop_dl/ffmpeg.py@@ -14,12 +14,12 @@ from typing import TYPE_CHECKING, Any, Literal, Self, TypeAlias, TypedDict, overfrom multidict import CIMultiDict, CIMultiDictProxy-from cyberdrop_dl.utils.utilities import DictDataclass+from cyberdrop_dl.utils import DictDataclassif TYPE_CHECKING:from collections.abc import Generator, Iterable, Iterator, Mapping- from cyberdrop_dl.data_structures import AbsoluteHttpURL+ from cyberdrop_dl.url_objects import AbsoluteHttpURL_CMD: TypeAlias = Iterable[str | Path]@@ -378,7 +378,14 @@ class SubProcessResult:def __json__(self) -> dict[str, Any]:joined_command = " ".join(map(str, self.command))- return dataclasses.asdict(self) | {"command": joined_command}+ me = dataclasses.asdict(self) | {"command": joined_command}+ try:+ stdout = json.loads(self.stdout)+ except json.JSONDecodeError:+ pass+ else:+ me["stdout"] = stdout+ return medef __str__(self) -> str:return str(self.__json__())diff --git a/cyberdrop_dl/hasher.py b/cyberdrop_dl/hasher.pyindex 673bcad31..714225572 100644--- a/cyberdrop_dl/hasher.py+++ b/cyberdrop_dl/hasher.py@@ -20,8 +20,8 @@ if TYPE_CHECKING:from yarl import URLfrom cyberdrop_dl.config.settings import DupeCleanup- from cyberdrop_dl.data_structures.url_objects import MediaItemfrom cyberdrop_dl.managers.manager import Manager+ from cyberdrop_dl.url_objects import MediaItem_HASHERS: Final = {diff --git a/cyberdrop_dl/managers/client_manager.py b/cyberdrop_dl/managers/client_manager.pyindex 7c0bd78ef..350dabf9b 100644--- a/cyberdrop_dl/managers/client_manager.py+++ b/cyberdrop_dl/managers/client_manager.py@@ -25,9 +25,9 @@ from cyberdrop_dl.clients.flaresolverr import FlareSolverrClientfrom cyberdrop_dl.clients.response import AbstractResponsefrom cyberdrop_dl.constants import FileExtfrom cyberdrop_dl.cookies import export_cookies, extract_cookies, read_netscape_files-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, MediaItemfrom cyberdrop_dl.exceptions import DDOSGuardError, DownloadError, ScrapeError, TooManyCrawlerErrorsfrom cyberdrop_dl.ffmpeg import probe+from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItemif TYPE_CHECKING:from collections.abc import Callable, Generator, Iterable, Mappingdiff --git a/cyberdrop_dl/managers/logs.py b/cyberdrop_dl/managers/logs.pyindex 4e4814e4d..9b72c1e16 100644--- a/cyberdrop_dl/managers/logs.py+++ b/cyberdrop_dl/managers/logs.py@@ -17,8 +17,8 @@ if TYPE_CHECKING:from yarl import URL- from cyberdrop_dl.data_structures.url_objects import MediaItemfrom cyberdrop_dl.managers.manager import Manager+ from cyberdrop_dl.url_objects import MediaItemlogger = logging.getLogger(__name__)diff --git a/cyberdrop_dl/managers/manager.py b/cyberdrop_dl/managers/manager.pyindex 81486bb1f..f427ce7e2 100644--- a/cyberdrop_dl/managers/manager.py+++ b/cyberdrop_dl/managers/manager.py@@ -17,18 +17,18 @@ from cyberdrop_dl.hasher import Hasherfrom cyberdrop_dl.logs import capture_logs, log_spacerfrom cyberdrop_dl.managers.client_manager import ClientManagerfrom cyberdrop_dl.managers.logs import LogManager-from cyberdrop_dl.utils.utilities import get_system_information+from cyberdrop_dl.utils import get_system_informationif TYPE_CHECKING:from collections.abc import Sequencefrom os import PathLike- from cyberdrop_dl.data_structures.url_objects import MediaItemfrom cyberdrop_dl.progress.dedupe import DedupeStatsfrom cyberdrop_dl.progress.hashing import HashingStatsfrom cyberdrop_dl.progress.scraping.errors import Errorfrom cyberdrop_dl.progress.sorting import SortStatsfrom cyberdrop_dl.scrape_mapper import ScrapeMapper, ScrapeStats+ from cyberdrop_dl.url_objects import MediaItemlogger = logging.getLogger(__name__)diff --git a/cyberdrop_dl/data_structures/mediaprops.py b/cyberdrop_dl/mediaprops.pysimilarity index 98%rename from cyberdrop_dl/data_structures/mediaprops.pyrename to cyberdrop_dl/mediaprops.pyindex 0a4b26673..95c33ad9d 100644--- a/cyberdrop_dl/data_structures/mediaprops.py+++ b/cyberdrop_dl/mediaprops.py@@ -11,7 +11,7 @@ if TYPE_CHECKING:import yarl- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+ from cyberdrop_dl.url_objects import AbsoluteHttpURLVIDEO_CODECS = "avc1", "avc2", "avc3", "avc4", "av1", "hevc", "hev1", "hev2", "hvc1", "hvc2", "vp8", "vp9", "vp10"diff --git a/cyberdrop_dl/models/types.py b/cyberdrop_dl/models/types.pyindex 1d684c8ec..e06a1c2d6 100755--- a/cyberdrop_dl/models/types.py+++ b/cyberdrop_dl/models/types.py@@ -14,7 +14,6 @@ from pydantic import (StringConstraints,)-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.models.validators import (bytesize_to_str,change_path_suffix,@@ -22,6 +21,7 @@ from cyberdrop_dl.models.validators import (falsy_as_none,to_yarl_url,)+from cyberdrop_dl.url_objects import AbsoluteHttpURL# ~~~~~ Strings ~~~~~~~NonEmptyStr = Annotated[str, StringConstraints(min_length=1, strip_whitespace=True)]diff --git a/cyberdrop_dl/models/validators.py b/cyberdrop_dl/models/validators.pyindex c53a72017..326dc1e3b 100755--- a/cyberdrop_dl/models/validators.py+++ b/cyberdrop_dl/models/validators.py@@ -27,7 +27,7 @@ def bytesize_to_str(value: _ConvertibleToInt) -> str:def to_yarl_url(value: object) -> yarl.URL:- from cyberdrop_dl.utils.utilities import parse_url+ from cyberdrop_dl.utils import parse_urltry:return parse_url(str(value))diff --git a/cyberdrop_dl/program_ui.py b/cyberdrop_dl/program_ui.pyindex b22063c3d..84a4d8b47 100644--- a/cyberdrop_dl/program_ui.py+++ b/cyberdrop_dl/program_ui.py@@ -17,8 +17,8 @@ from rich.text import Textfrom cyberdrop_dl import __version__from cyberdrop_dl.hasher import hash_directory_scannerfrom cyberdrop_dl.progress import hyperlink+from cyberdrop_dl.sorter import Sorterfrom cyberdrop_dl.utils import text_editor-from cyberdrop_dl.utils.sorting import Sorterif TYPE_CHECKING:from collections.abc import Callable, Iterablediff --git a/cyberdrop_dl/scrape_mapper.py b/cyberdrop_dl/scrape_mapper.pyindex 00e908cbf..29e2aa559 100644--- a/cyberdrop_dl/scrape_mapper.py+++ b/cyberdrop_dl/scrape_mapper.py@@ -21,12 +21,11 @@ from cyberdrop_dl.crawlers.discourse import DiscourseCrawlerfrom cyberdrop_dl.crawlers.http_direct import DirectHttpFilefrom cyberdrop_dl.crawlers.realdebrid import RealDebridCrawlerfrom cyberdrop_dl.crawlers.wordpress import WordPressHTMLCrawler, WordPressMediaCrawler-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.exceptions import JDownloaderError, NoExtensionErrorfrom cyberdrop_dl.logs import log_spacerfrom cyberdrop_dl.progress.scraping import ScrapingUI-from cyberdrop_dl.utils import filepath-from cyberdrop_dl.utils.utilities import get_download_path, remove_trailing_slash+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import filepath, get_download_path, remove_trailing_slashif TYPE_CHECKING:from collections.abc import AsyncGenerator, Coroutine, Generator, Iterable, Iterator, Sequencediff --git a/cyberdrop_dl/utils/sorting.py b/cyberdrop_dl/sorter.pysimilarity index 98%rename from cyberdrop_dl/utils/sorting.pyrename to cyberdrop_dl/sorter.pyindex 388988b37..26857fcd7 100644--- a/cyberdrop_dl/utils/sorting.py+++ b/cyberdrop_dl/sorter.py@@ -15,8 +15,7 @@ import imagesizefrom cyberdrop_dl import aio, ffmpegfrom cyberdrop_dl.constants import FileExt, TempExtfrom cyberdrop_dl.progress.sorting import SortingUI-from cyberdrop_dl.utils import strings-from cyberdrop_dl.utils.utilities import delete_empty_files_and_folders+from cyberdrop_dl.utils import delete_empty_files_and_folders, stringsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/storage/__init__.py b/cyberdrop_dl/storage/__init__.pyindex 6fab91ce3..5389234db 100644--- a/cyberdrop_dl/storage/__init__.py+++ b/cyberdrop_dl/storage/__init__.py@@ -15,7 +15,7 @@ if TYPE_CHECKING:from collections.abc import AsyncGenerator, Awaitable, Callablefrom pathlib import Path- from cyberdrop_dl.data_structures import MediaItem+ from cyberdrop_dl.url_objects import MediaItem_required_free_space: ContextVar[int] = ContextVar("_required_free_space")diff --git a/cyberdrop_dl/updates.py b/cyberdrop_dl/updates.pynew file mode 100644index 000000000..baaadf843--- /dev/null+++ b/cyberdrop_dl/updates.py@@ -0,0 +1,45 @@+from __future__ import annotations++import logging+from typing import Any++import aiohttp++from cyberdrop_dl import __version__ as current++_PYPI_JSON_URL = "https://pypi.org/pypi/cyberdrop-dl-patched/json"+logger = logging.getLogger(__name__)+++async def check_latest_pypi() -> None:+ logger.info("Checking for updates...")+ try:+ contents = await _request_pypi_info()++ except Exception as e:+ logger.error(f"Unable to get latest version information {e!r}")+ raise+ else:+ _parse_pypi_resp(contents)+++async def _request_pypi_info() -> dict[str, Any]:+ async with aiohttp.request(+ "GET",+ _PYPI_JSON_URL,+ raise_for_status=True,+ timeout=aiohttp.ClientTimeout(sock_read=30, sock_connect=20),+ ) as response:+ return await response.json()+++def _parse_pypi_resp(data: dict[str, Any]) -> None:+ latest: str = data["info"]["version"]+ releases: set[str] = set(data["releases"])++ if current not in releases:+ logger.warning(f"You are using an unreleased version of CDL: {current}. Latest stable release {latest}")+ elif current == latest:+ logger.info(f"You are using the latest version of CDL: {current}")+ else:+ logger.warning(f"A new version is available: {latest}")diff --git a/cyberdrop_dl/data_structures/url_objects.py b/cyberdrop_dl/url_objects.pysimilarity index 99%rename from cyberdrop_dl/data_structures/url_objects.pyrename to cyberdrop_dl/url_objects.pyindex 89ebd4003..f32fcbf2a 100644--- a/cyberdrop_dl/data_structures/url_objects.py+++ b/cyberdrop_dl/url_objects.py@@ -345,7 +345,7 @@ class ScrapeItem:add_parent: AbsoluteHttpURL | bool | None = None,) -> Self:"""Creates a scrape item."""- from cyberdrop_dl.utils.utilities import is_absolute_http_url+ from cyberdrop_dl.utils import is_absolute_http_urlscrape_item = self.copy()assert is_absolute_http_url(url)diff --git a/cyberdrop_dl/utils/__init__.py b/cyberdrop_dl/utils/__init__.pyindex baaadf843..3d3f8df2b 100644--- a/cyberdrop_dl/utils/__init__.py+++ b/cyberdrop_dl/utils/__init__.py@@ -1,45 +1,391 @@from __future__ import annotations+import contextlib+import dataclasses+import functools+import inspect+import itertoolsimport logging-from typing import Any+import os+import platform+import re+import sys+from http import HTTPStatus+from pathlib import Path+from typing import TYPE_CHECKING, Any, ClassVar, Concatenate, ParamSpec, Protocol, Self, TypeVar, cast, overload-import aiohttp+import yarl+from aiohttp import ClientConnectorError, TooManyRedirects+from mega.errors import MegaNzError+from pydantic import ValidationError+from typing_extensions import TypeIs++from cyberdrop_dl.constants import TempExt+from cyberdrop_dl.exceptions import (+ CDLBaseError,+ ErrorLogMessage,+ InvalidURLError,+ TooManyCrawlerErrors,+ create_error_msg,+ get_origin,+)++if TYPE_CHECKING:+ from collections.abc import Callable, Coroutine, Generator++ from cyberdrop_dl.downloader.downloader import Downloader+ from cyberdrop_dl.managers.manager import Manager+ from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItem, ScrapeItem++ class _HasManager(Protocol):+ manager: Manager++ _HasManagerT = TypeVar("_HasManagerT", bound=_HasManager)+ _Origin = TypeVar("_Origin", bound=ScrapeItem | MediaItem | yarl.URL)++_P = ParamSpec("_P")+_R = TypeVar("_R")+++class Dataclass(Protocol):+ __dataclass_fields__: ClassVar[dict[str, Any]]-from cyberdrop_dl import __version__ as current-_PYPI_JSON_URL = "https://pypi.org/pypi/cyberdrop-dl-patched/json"logger = logging.getLogger(__name__)-async def check_latest_pypi() -> None:- logger.info("Checking for updates...")+_FIELDS_CACHE: dict[type, tuple[str, ...]] = {}+++def _fields(cls: type) -> tuple[str, ...]:+ if fields := _FIELDS_CACHE.get(cls):+ return fields+ fields = _FIELDS_CACHE[cls] = tuple(f.name for f in dataclasses.fields(cls))+ return fields+++class DictDataclass(Dataclass, Protocol):+ @classmethod+ def filter_dict(cls, data: dict[str, Any], /) -> dict[str, Any]:+ return {name: data.get(name) for name in _fields(cls)}++ @classmethod+ def from_dict(cls, data: dict[str, Any], /, **overrides: Any) -> Self:+ if overrides:+ data.update(overrides)+ return cls(**cls.filter_dict(data))+++def error_handling_context(self: _HasManager, item: ScrapeItem | MediaItem | yarl.URL) -> Generator[None]:+ link: yarl.URL = item if isinstance(item, yarl.URL) else item.url+ error_log_msg = origin = exc_info = None+ link_to_show: yarl.URL | str = ""+ is_segment: bool = getattr(item, "is_segment", False)+ is_downloader: bool = bool(getattr(self, "log_prefix", False))try:- contents = await _request_pypi_info()+ yield+ except TooManyCrawlerErrors:+ return+ except CDLBaseError as e:+ error_log_msg = ErrorLogMessage(e.ui_failure, str(e))+ origin = e.origin+ link_to_show = getattr(e, "url", None) or link_to_show+ except NotImplementedError as e:+ error_log_msg = ErrorLogMessage("NotImplemented")+ exc_info = e+ except TooManyRedirects as e:+ ui_failure = "Too Many Redirects"+ info = {+ "url": str(e.request_info.real_url),+ "history": tuple(str(r.real_url) for r in e.history),+ }+ error_log_msg = ErrorLogMessage(ui_failure, f"{ui_failure}\n{info}")+ except MegaNzError as e:+ if code := getattr(e, "code", None):+ if http_code := {+ -9: HTTPStatus.GONE,+ -16: HTTPStatus.FORBIDDEN,+ -24: 509,+ -401: 509,+ }.get(code):+ ui_failure = create_error_msg(http_code)+ else:+ ui_failure = f"MegaNZ Error [{code}]"+ else:+ ui_failure = "MegaNZ Error"++ error_log_msg = ErrorLogMessage(ui_failure, str(e))+ except TimeoutError as e:+ error_log_msg = ErrorLogMessage("Timeout", repr(e))+ except ClientConnectorError as e:+ ui_failure = "Client Connector Error"+ suffix = "" if (link.host or "").startswith(e.host) else f" from {link}"+ log_msg = f"{e}{suffix}. If you're using a VPN, try turning it off"+ error_log_msg = ErrorLogMessage(ui_failure, log_msg)+ except ValidationError as e:+ exc_info = e+ ui_failure = create_error_msg(422)+ log_msg = str(e).partition("For further information")[0].strip()+ error_log_msg = ErrorLogMessage(ui_failure, log_msg)except Exception as e:- logger.error(f"Unable to get latest version information {e!r}")- raise- else:- _parse_pypi_resp(contents)---async def _request_pypi_info() -> dict[str, Any]:- async with aiohttp.request(- "GET",- _PYPI_JSON_URL,- raise_for_status=True,- timeout=aiohttp.ClientTimeout(sock_read=30, sock_connect=20),- ) as response:- return await response.json()---def _parse_pypi_resp(data: dict[str, Any]) -> None:- latest: str = data["info"]["version"]- releases: set[str] = set(data["releases"])-- if current not in releases:- logger.warning(f"You are using an unreleased version of CDL: {current}. Latest stable release {latest}")- elif current == latest:- logger.info(f"You are using the latest version of CDL: {current}")- else:- logger.warning(f"A new version is available: {latest}")+ exc_info = e+ error_log_msg = ErrorLogMessage.from_unknown_exc(e)++ if error_log_msg is None or is_segment:+ return++ link_to_show = link_to_show or link+ origin = origin or get_origin(item)+ if is_downloader:+ self, item = cast("Downloader", self), cast("MediaItem", item)+ self.write_download_error(item, error_log_msg, exc_info)+ return++ logger.error(f"Scrape Failed: {link_to_show} ({error_log_msg.main_log_msg})", exc_info=exc_info)+ self.manager.logs.write_scrape_error(link_to_show, error_log_msg.csv_log_msg, origin)+ self.manager.scrape_mapper.tui.scrape_errors.add(error_log_msg.ui_failure)+++@overload+def error_handling_wrapper(+ func: Callable[Concatenate[_HasManagerT, _Origin, _P], _R],+) -> Callable[Concatenate[_HasManagerT, _Origin, _P], _R]: ...+++@overload+def error_handling_wrapper(+ func: Callable[Concatenate[_HasManagerT, _Origin, _P], Coroutine[None, None, _R]],+) -> Callable[Concatenate[_HasManagerT, _Origin, _P], Coroutine[None, None, _R]]: ...+++def error_handling_wrapper(+ func: Callable[Concatenate[_HasManagerT, _Origin, _P], _R | Coroutine[None, None, _R]],+) -> Callable[Concatenate[_HasManagerT, _Origin, _P], _R | Coroutine[None, None, _R]]:+ """Wrapper handles errors for url scraping."""++ if inspect.iscoroutinefunction(func):++ @functools.wraps(func)+ async def async_wrapper(self: _HasManagerT, item: _Origin, *args: _P.args, **kwargs: _P.kwargs) -> _R:+ with error_handling_context(self, item):+ return await func(self, item, *args, **kwargs)++ return async_wrapper++ @functools.wraps(func)+ def wrapper(self: _HasManagerT, item: _Origin, *args: _P.args, **kwargs: _P.kwargs) -> _R:+ with error_handling_context(self, item):+ result = func(self, item, *args, **kwargs)+ assert not inspect.isawaitable(result)+ return result++ return wrapper+++def get_download_path(manager: Manager, scrape_item: ScrapeItem, domain: str) -> Path:+ """Returns the path to the download folder."""+ download_dir = manager.config.settings.files.download_folder++ return download_dir / scrape_item.create_download_path(domain)+++def _get_size(path: os.DirEntry[str]) -> int | None:+ try:+ return path.stat(follow_symlinks=False).st_size+ except (OSError, ValueError):+ return+++def delete_empty_files_and_folders(dirname: Path | str) -> bool:+ """walks and removes in place"""++ has_non_empty_files = False+ has_non_empty_subfolders = False++ try:+ for entry in os.scandir(dirname):+ try:+ is_dir = entry.is_dir(follow_symlinks=False)+ except OSError:+ is_dir = False+ if is_dir:+ deleted = delete_empty_files_and_folders(entry.path)+ if not deleted:+ has_non_empty_subfolders = True+ elif _get_size(entry) == 0:+ logger.debug(f"Deleting '{entry.path}'")+ os.unlink(entry) # noqa: PTH108+ else:+ has_non_empty_files = True++ except OSError:+ logger.exception(f"Unknown errot while walking '{dirname}'")+ pass++ if has_non_empty_files or has_non_empty_subfolders:+ return False+ try:+ os.rmdir(dirname) # noqa: PTH106+ return True+ except OSError:+ return False+++def check_partials_and_empty_folders(manager: Manager) -> None:+ download_folder = manager.config.settings.files.download_folder++ _check_for_partial_files(download_folder)+ settings = manager.config.settings.runtime_options+ if settings.delete_partial_files:+ logger.info("Deleting partial downloads...")+ for file in _partial_files(download_folder):+ logger.debug(f"Deleting '{file}'")+ file.unlink(missing_ok=True)++ if settings.skip_check_for_empty_folders:+ return++ logger.info("Deleting empty files and folders...")+ _ = delete_empty_files_and_folders(download_folder)++ sorted_folder = manager.config.settings.sorting.sort_folder+ if sorted_folder and manager.config.settings.sorting.sort_downloads:+ _ = delete_empty_files_and_folders(sorted_folder)+++def _partial_files(dir: Path | str) -> Generator[Path]:+ try:+ for entry in os.scandir(dir):+ try:+ if entry.is_dir(follow_symlinks=False):+ yield from _partial_files(entry.path)+ continue+ except OSError:+ pass++ suffix = entry.name.rpartition(".")[-1]+ if f".{suffix}" in TempExt:+ yield Path(entry.path)+ except OSError:+ return+++def _check_for_partial_files(path: Path) -> None:+ logger.info("Checking for partial downloads...")+ has_partial_files = next(_partial_files(path), None)+ if has_partial_files:+ logger.warning("There are partial downloads in the downloads folder")+++def get_text_between(original_text: str, start: str, end: str) -> str:+ """Extracts the text between two strings in a larger text. Result will be stripped"""+ start_index = original_text.index(start) + len(start)+ end_index = original_text.index(end, start_index)+ return original_text[start_index:end_index].strip()+++def _str_to_url(link_str: str) -> yarl.URL:+ if not link_str:+ raise InvalidURLError("link_str is empty", url=link_str)++ def fix_query_params_encoding(link: str) -> str:+ if "?" not in link:+ return link+ parts, query_and_frag = link.split("?", 1)+ query_and_frag = query_and_frag.replace("+", "%20")+ return f"{parts}?{query_and_frag}"++ def fix_multiple_slashes(link_str: str) -> str:+ return re.sub(r"(?:https?)?:?(\/{3,})", "//", link_str)++ try:+ clean_link_str = fix_multiple_slashes(fix_query_params_encoding(link_str))+ return yarl.URL(clean_link_str, encoded="%" in clean_link_str)++ except (AttributeError, ValueError, TypeError) as e:+ raise InvalidURLError(str(e), url=link_str) from e+++def parse_url(+ link_str: AbsoluteHttpURL | yarl.URL | str, relative_to: AbsoluteHttpURL | None = None, *, trim: bool = True+) -> AbsoluteHttpURL:+ """Parse a string into an absolute URL, handling relative URLs, encoding and optionally removes trailing slash (trimming).+ Raises:+ InvalidURLError: If the input string is not a valid URL or if any other error occurs during parsing.+ TypeError: If `relative_to` is `None` and the parsed URL is relative or has no scheme.+ """++ url = _str_to_url(link_str) if isinstance(link_str, str) else link_str+ if not url.absolute:+ if not relative_to:+ raise InvalidURLError("Relative URL with no known base", url=link_str)+ url = relative_to.join(url)+ if not url.scheme:+ url = url.with_scheme(relative_to.scheme if relative_to else "https")+ assert is_absolute_http_url(url)+ if not trim:+ return url+ return remove_trailing_slash(url)+++def is_absolute_http_url(url: yarl.URL) -> TypeIs[AbsoluteHttpURL]:+ return url.absolute and url.scheme.startswith("http")+++def remove_trailing_slash(url: AbsoluteHttpURL) -> AbsoluteHttpURL:+ if url.name or url.path == "/":+ return url+ return url.parent.with_fragment(url.fragment).with_query(url.query)+++def remove_parts(+ url: AbsoluteHttpURL, *parts_to_remove: str, keep_query: bool = True, keep_fragment: bool = True+) -> AbsoluteHttpURL:+ if not parts_to_remove:+ return url+ new_parts = [p for p in url.parts[1:] if p not in parts_to_remove]+ return url.with_path("/".join(new_parts), keep_fragment=keep_fragment, keep_query=keep_query)+++def get_system_information() -> dict[str, Any]:+ def get_common_name() -> str:+ system = platform.system()++ if system in ("Linux",):+ try:+ return platform.freedesktop_os_release()["PRETTY_NAME"]+ except OSError:+ pass++ if system == "Android" and sys.version_info >= (3, 13):+ ver = platform.android_ver()+ os_name = f"{system} {ver.release}"+ for component in (ver.manufacturer, ver.model, ver.device):+ if component:+ os_name += f" ({component})"+ return os_name++ default = platform.platform(aliased=True, terse=True).replace("-", " ")+ if system == "Windows" and (edition := platform.win32_edition()):+ return f"{default} {edition}"+ return default++ system_info = platform.uname()._asdict() | {+ "architecture": str(platform.architecture()),+ "python": f"{platform.python_version()} {platform.python_implementation()}",+ "common_name": get_common_name(),+ }+ _ = system_info.pop("node", None)+ return system_info+++def is_blob_or_svg(link: str) -> bool:+ return link.startswith(("data:", "blob:", "javascript:"))+++def xor_decrypt(encrypted_data: bytes, key: bytes) -> str:+ data = bytearray(b_input ^ b_key for b_input, b_key in zip(encrypted_data, itertools.cycle(key)))+ return data.decode("utf-8", errors="ignore")diff --git a/cyberdrop_dl/utils/m3u8.py b/cyberdrop_dl/utils/m3u8.pyindex 181b546eb..3f074442b 100644--- a/cyberdrop_dl/utils/m3u8.py+++ b/cyberdrop_dl/utils/m3u8.py@@ -10,13 +10,13 @@ import m3u8.modelfrom m3u8 import M3U8 as _M3U8from m3u8 import Media, Playlist-from cyberdrop_dl.data_structures.mediaprops import Codecs, Resolution-from cyberdrop_dl.utils.utilities import parse_url+from cyberdrop_dl.mediaprops import Codecs, Resolution+from cyberdrop_dl.utils import parse_urlif TYPE_CHECKING:from collections.abc import Generator, Iterable- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+ from cyberdrop_dl.url_objects import AbsoluteHttpURLclass MediaType(StrEnum):diff --git a/cyberdrop_dl/utils/utilities.py b/cyberdrop_dl/utils/utilities.pydeleted file mode 100644index 100670151..000000000--- a/cyberdrop_dl/utils/utilities.py+++ /dev/null@@ -1,391 +0,0 @@-from __future__ import annotations--import contextlib-import dataclasses-import functools-import inspect-import itertools-import logging-import os-import platform-import re-import sys-from http import HTTPStatus-from pathlib import Path-from typing import TYPE_CHECKING, Any, ClassVar, Concatenate, ParamSpec, Protocol, Self, TypeVar, cast, overload--import yarl-from aiohttp import ClientConnectorError, TooManyRedirects-from mega.errors import MegaNzError-from pydantic import ValidationError-from typing_extensions import TypeIs--from cyberdrop_dl.constants import TempExt-from cyberdrop_dl.exceptions import (- CDLBaseError,- ErrorLogMessage,- InvalidURLError,- TooManyCrawlerErrors,- create_error_msg,- get_origin,-)--if TYPE_CHECKING:- from collections.abc import Callable, Coroutine, Generator-- from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, MediaItem, ScrapeItem- from cyberdrop_dl.downloader.downloader import Downloader- from cyberdrop_dl.managers.manager import Manager-- class _HasManager(Protocol):- manager: Manager-- _HasManagerT = TypeVar("_HasManagerT", bound=_HasManager)- _Origin = TypeVar("_Origin", bound=ScrapeItem | MediaItem | yarl.URL)--_P = ParamSpec("_P")-_R = TypeVar("_R")---class Dataclass(Protocol):- __dataclass_fields__: ClassVar[dict[str, Any]]---logger = logging.getLogger(__name__)---_FIELDS_CACHE: dict[type, tuple[str, ...]] = {}---def _fields(cls: type) -> tuple[str, ...]:- if fields := _FIELDS_CACHE.get(cls):- return fields- fields = _FIELDS_CACHE[cls] = tuple(f.name for f in dataclasses.fields(cls))- return fields---class DictDataclass(Dataclass, Protocol):- @classmethod- def filter_dict(cls, data: dict[str, Any], /) -> dict[str, Any]:- return {name: data.get(name) for name in _fields(cls)}-- @classmethod- def from_dict(cls, data: dict[str, Any], /, **overrides: Any) -> Self:- if overrides:- data.update(overrides)- return cls(**cls.filter_dict(data))---def error_handling_context(self: _HasManager, item: ScrapeItem | MediaItem | yarl.URL) -> Generator[None]:- link: yarl.URL = item if isinstance(item, yarl.URL) else item.url- error_log_msg = origin = exc_info = None- link_to_show: yarl.URL | str = ""- is_segment: bool = getattr(item, "is_segment", False)- is_downloader: bool = bool(getattr(self, "log_prefix", False))- try:- yield- except TooManyCrawlerErrors:- return- except CDLBaseError as e:- error_log_msg = ErrorLogMessage(e.ui_failure, str(e))- origin = e.origin- link_to_show = getattr(e, "url", None) or link_to_show- except NotImplementedError as e:- error_log_msg = ErrorLogMessage("NotImplemented")- exc_info = e- except TooManyRedirects as e:- ui_failure = "Too Many Redirects"- info = {- "url": str(e.request_info.real_url),- "history": tuple(str(r.real_url) for r in e.history),- }- error_log_msg = ErrorLogMessage(ui_failure, f"{ui_failure}\n{info}")- except MegaNzError as e:- if code := getattr(e, "code", None):- if http_code := {- -9: HTTPStatus.GONE,- -16: HTTPStatus.FORBIDDEN,- -24: 509,- -401: 509,- }.get(code):- ui_failure = create_error_msg(http_code)- else:- ui_failure = f"MegaNZ Error [{code}]"- else:- ui_failure = "MegaNZ Error"-- error_log_msg = ErrorLogMessage(ui_failure, str(e))-- except TimeoutError as e:- error_log_msg = ErrorLogMessage("Timeout", repr(e))- except ClientConnectorError as e:- ui_failure = "Client Connector Error"- suffix = "" if (link.host or "").startswith(e.host) else f" from {link}"- log_msg = f"{e}{suffix}. If you're using a VPN, try turning it off"- error_log_msg = ErrorLogMessage(ui_failure, log_msg)- except ValidationError as e:- exc_info = e- ui_failure = create_error_msg(422)- log_msg = str(e).partition("For further information")[0].strip()- error_log_msg = ErrorLogMessage(ui_failure, log_msg)- except Exception as e:- exc_info = e- error_log_msg = ErrorLogMessage.from_unknown_exc(e)-- if error_log_msg is None or is_segment:- return-- link_to_show = link_to_show or link- origin = origin or get_origin(item)- if is_downloader:- self, item = cast("Downloader", self), cast("MediaItem", item)- self.write_download_error(item, error_log_msg, exc_info)- return-- logger.error(f"Scrape Failed: {link_to_show} ({error_log_msg.main_log_msg})", exc_info=exc_info)- self.manager.logs.write_scrape_error(link_to_show, error_log_msg.csv_log_msg, origin)- self.manager.scrape_mapper.tui.scrape_errors.add(error_log_msg.ui_failure)---@overload-def error_handling_wrapper(- func: Callable[Concatenate[_HasManagerT, _Origin, _P], _R],-) -> Callable[Concatenate[_HasManagerT, _Origin, _P], _R]: ...---@overload-def error_handling_wrapper(- func: Callable[Concatenate[_HasManagerT, _Origin, _P], Coroutine[None, None, _R]],-) -> Callable[Concatenate[_HasManagerT, _Origin, _P], Coroutine[None, None, _R]]: ...---def error_handling_wrapper(- func: Callable[Concatenate[_HasManagerT, _Origin, _P], _R | Coroutine[None, None, _R]],-) -> Callable[Concatenate[_HasManagerT, _Origin, _P], _R | Coroutine[None, None, _R]]:- """Wrapper handles errors for url scraping."""-- if inspect.iscoroutinefunction(func):-- @functools.wraps(func)- async def async_wrapper(self: _HasManagerT, item: _Origin, *args: _P.args, **kwargs: _P.kwargs) -> _R:- with error_handling_context(self, item):- return await func(self, item, *args, **kwargs)-- return async_wrapper-- @functools.wraps(func)- def wrapper(self: _HasManagerT, item: _Origin, *args: _P.args, **kwargs: _P.kwargs) -> _R:- with error_handling_context(self, item):- result = func(self, item, *args, **kwargs)- assert not inspect.isawaitable(result)- return result-- return wrapper---def get_download_path(manager: Manager, scrape_item: ScrapeItem, domain: str) -> Path:- """Returns the path to the download folder."""- download_dir = manager.config.settings.files.download_folder-- return download_dir / scrape_item.create_download_path(domain)---def _get_size(path: os.DirEntry[str]) -> int | None:- try:- return path.stat(follow_symlinks=False).st_size- except (OSError, ValueError):- return---def delete_empty_files_and_folders(dirname: Path | str) -> bool:- """walks and removes in place"""-- has_non_empty_files = False- has_non_empty_subfolders = False-- try:- for entry in os.scandir(dirname):- try:- is_dir = entry.is_dir(follow_symlinks=False)- except OSError:- is_dir = False- if is_dir:- deleted = delete_empty_files_and_folders(entry.path)- if not deleted:- has_non_empty_subfolders = True- elif _get_size(entry) == 0:- logger.debug(f"Deleting '{entry.path}'")- os.unlink(entry) # noqa: PTH108- else:- has_non_empty_files = True-- except OSError:- logger.exception(f"Unknown errot while walking '{dirname}'")- pass-- if has_non_empty_files or has_non_empty_subfolders:- return False- try:- os.rmdir(dirname) # noqa: PTH106- return True- except OSError:- return False---def check_partials_and_empty_folders(manager: Manager) -> None:- download_folder = manager.config.settings.files.download_folder-- _check_for_partial_files(download_folder)- settings = manager.config.settings.runtime_options- if settings.delete_partial_files:- logger.info("Deleting partial downloads...")- for file in _partial_files(download_folder):- logger.debug(f"Deleting '{file}'")- file.unlink(missing_ok=True)-- if settings.skip_check_for_empty_folders:- return-- logger.info("Deleting empty files and folders...")- _ = delete_empty_files_and_folders(download_folder)-- sorted_folder = manager.config.settings.sorting.sort_folder- if sorted_folder and manager.config.settings.sorting.sort_downloads:- _ = delete_empty_files_and_folders(sorted_folder)---def _partial_files(dir: Path | str) -> Generator[Path]:- try:- for entry in os.scandir(dir):- try:- if entry.is_dir(follow_symlinks=False):- yield from _partial_files(entry.path)- continue- except OSError:- pass-- suffix = entry.name.rpartition(".")[-1]- if f".{suffix}" in TempExt:- yield Path(entry.path)- except OSError:- return---def _check_for_partial_files(path: Path) -> None:- logger.info("Checking for partial downloads...")- has_partial_files = next(_partial_files(path), None)- if has_partial_files:- logger.warning("There are partial downloads in the downloads folder")---def get_text_between(original_text: str, start: str, end: str) -> str:- """Extracts the text between two strings in a larger text. Result will be stripped"""- start_index = original_text.index(start) + len(start)- end_index = original_text.index(end, start_index)- return original_text[start_index:end_index].strip()---def _str_to_url(link_str: str) -> yarl.URL:- if not link_str:- raise InvalidURLError("link_str is empty", url=link_str)-- def fix_query_params_encoding(link: str) -> str:- if "?" not in link:- return link- parts, query_and_frag = link.split("?", 1)- query_and_frag = query_and_frag.replace("+", "%20")- return f"{parts}?{query_and_frag}"-- def fix_multiple_slashes(link_str: str) -> str:- return re.sub(r"(?:https?)?:?(\/{3,})", "//", link_str)-- try:- clean_link_str = fix_multiple_slashes(fix_query_params_encoding(link_str))- return yarl.URL(clean_link_str, encoded="%" in clean_link_str)-- except (AttributeError, ValueError, TypeError) as e:- raise InvalidURLError(str(e), url=link_str) from e---def parse_url(- link_str: AbsoluteHttpURL | yarl.URL | str, relative_to: AbsoluteHttpURL | None = None, *, trim: bool = True-) -> AbsoluteHttpURL:- """Parse a string into an absolute URL, handling relative URLs, encoding and optionally removes trailing slash (trimming).- Raises:- InvalidURLError: If the input string is not a valid URL or if any other error occurs during parsing.- TypeError: If `relative_to` is `None` and the parsed URL is relative or has no scheme.- """-- url = _str_to_url(link_str) if isinstance(link_str, str) else link_str- if not url.absolute:- if not relative_to:- raise InvalidURLError("Relative URL with no known base", url=link_str)- url = relative_to.join(url)- if not url.scheme:- url = url.with_scheme(relative_to.scheme if relative_to else "https")- assert is_absolute_http_url(url)- if not trim:- return url- return remove_trailing_slash(url)---def is_absolute_http_url(url: yarl.URL) -> TypeIs[AbsoluteHttpURL]:- return url.absolute and url.scheme.startswith("http")---def remove_trailing_slash(url: AbsoluteHttpURL) -> AbsoluteHttpURL:- if url.name or url.path == "/":- return url- return url.parent.with_fragment(url.fragment).with_query(url.query)---def remove_parts(- url: AbsoluteHttpURL, *parts_to_remove: str, keep_query: bool = True, keep_fragment: bool = True-) -> AbsoluteHttpURL:- if not parts_to_remove:- return url- new_parts = [p for p in url.parts[1:] if p not in parts_to_remove]- return url.with_path("/".join(new_parts), keep_fragment=keep_fragment, keep_query=keep_query)---def get_system_information() -> dict[str, Any]:- def get_common_name() -> str:- system = platform.system()-- if system in ("Linux",):- try:- return platform.freedesktop_os_release()["PRETTY_NAME"]- except OSError:- pass-- if system == "Android" and sys.version_info >= (3, 13):- ver = platform.android_ver()- os_name = f"{system} {ver.release}"- for component in (ver.manufacturer, ver.model, ver.device):- if component:- os_name += f" ({component})"- return os_name-- default = platform.platform(aliased=True, terse=True).replace("-", " ")- if system == "Windows" and (edition := platform.win32_edition()):- return f"{default} {edition}"- return default-- system_info = platform.uname()._asdict() | {- "architecture": str(platform.architecture()),- "python": f"{platform.python_version()} {platform.python_implementation()}",- "common_name": get_common_name(),- }- _ = system_info.pop("node", None)- return system_info---def is_blob_or_svg(link: str) -> bool:- return link.startswith(("data:", "blob:", "javascript:"))---def xor_decrypt(encrypted_data: bytes, key: bytes) -> str:- data = bytearray(b_input ^ b_key for b_input, b_key in zip(encrypted_data, itertools.cycle(key)))- return data.decode("utf-8", errors="ignore")diff --git a/pyproject.toml b/pyproject.tomlindex 1a825d93a..44e4fb507 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -44,7 +44,7 @@ license = "GPL-3.0-only"license-files = ["LICENSE"]readme = "README.md"requires-python = ">=3.11"-version = "9.2.0"+version = "9.2.1.dev0"[project.optional-dependencies]extras = [diff --git a/tests/crawlers/test_crawlers.py b/tests/crawlers/test_crawlers.pyindex 2ee11527f..8f0b16227 100644--- a/tests/crawlers/test_crawlers.py+++ b/tests/crawlers/test_crawlers.py@@ -12,10 +12,9 @@ import pytestfrom pydantic import TypeAdapterfrom typing_extensions import TypedDict-from cyberdrop_dl.data_structures import AbsoluteHttpURL-from cyberdrop_dl.data_structures.url_objects import MediaItem, ScrapeItemfrom cyberdrop_dl.scrape_mapper import ScrapeMapper-from cyberdrop_dl.utils.utilities import parse_url+from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItem, ScrapeItem+from cyberdrop_dl.utils import parse_urlif TYPE_CHECKING:from cyberdrop_dl.crawlers.crawler import Crawlerdiff --git a/tests/crawlers/test_vbulletin.py b/tests/crawlers/test_vbulletin.pyindex 78f4e8915..5b8562fb9 100644--- a/tests/crawlers/test_vbulletin.py+++ b/tests/crawlers/test_vbulletin.py@@ -3,7 +3,7 @@ from __future__ import annotationsimport pytestfrom cyberdrop_dl.crawlers import _forum, vbulletin-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURL@pytest.mark.parametrize(diff --git a/tests/crawlers/test_xenforo.py b/tests/crawlers/test_xenforo.pyindex 10736db48..a2044cf40 100644--- a/tests/crawlers/test_xenforo.py+++ b/tests/crawlers/test_xenforo.py@@ -9,9 +9,9 @@ from bs4 import BeautifulSoupfrom cyberdrop_dl.crawlers import _forumfrom cyberdrop_dl.crawlers import xenforo as crawlersfrom cyberdrop_dl.crawlers.xenforo import xenforo-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.exceptions import ScrapeErrorfrom cyberdrop_dl.managers.manager import Manager+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItemdef _item(url: str) -> ScrapeItem:diff --git a/tests/test_database.py b/tests/test_database.pyindex 17266769d..e5341693f 100644--- a/tests/test_database.py+++ b/tests/test_database.py@@ -7,9 +7,9 @@ from typing import TYPE_CHECKING, castimport pytestfrom cyberdrop_dl import scrape_mapper-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL, ScrapeItemfrom cyberdrop_dl.scrape_mapper import _create_item_from_row-from cyberdrop_dl.utils.utilities import parse_url+from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem+from cyberdrop_dl.utils import parse_urlif TYPE_CHECKING:import aiosqlitediff --git a/tests/test_download_client.py b/tests/test_download_client.pyindex c4dc83de5..64bec393b 100644--- a/tests/test_download_client.py+++ b/tests/test_download_client.py@@ -3,7 +3,7 @@ from typing import castimport pytestfrom cyberdrop_dl.clients import download_client-from cyberdrop_dl.data_structures import MediaItem+from cyberdrop_dl.url_objects import MediaItemdef _item(fallbacks_: object) -> MediaItem:diff --git a/tests/test_ffmpeg.py b/tests/test_ffmpeg.pyindex 0e64b6982..7d28f3385 100644--- a/tests/test_ffmpeg.py+++ b/tests/test_ffmpeg.py@@ -3,7 +3,7 @@ import datetimeimport pytestfrom cyberdrop_dl import ffmpeg-from cyberdrop_dl.data_structures import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLFFPROBE_IS_INSTALLED = bool(ffmpeg.get_ffprobe_version())diff --git a/tests/test_flaresolverr.py b/tests/test_flaresolverr.pyindex 779b19235..f698e6097 100644--- a/tests/test_flaresolverr.py+++ b/tests/test_flaresolverr.py@@ -5,7 +5,7 @@ import aiohttpimport pytestfrom cyberdrop_dl.clients.flaresolverr import Command, FlareSolverrClient-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURLENV_NAME = "CDL_FLARESOLVERR"FLARESOLVER_URL = os.environ.get(ENV_NAME, "") # or "http://localhost:8191"diff --git a/tests/test_m3u8.py b/tests/test_m3u8.pyindex a903c4ff5..4a028954b 100644--- a/tests/test_m3u8.py+++ b/tests/test_m3u8.py@@ -3,8 +3,8 @@ from typing import LiteralStringimport pytest-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.exceptions import InvalidURLError+from cyberdrop_dl.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.utils import m3u8diff --git a/tests/test_real_debrid.py b/tests/test_real_debrid.pyindex 076622895..dc2feff66 100644--- a/tests/test_real_debrid.py+++ b/tests/test_real_debrid.py@@ -1,7 +1,7 @@import pytestfrom cyberdrop_dl.crawlers import realdebrid-from cyberdrop_dl.data_structures.url_objects import AbsoluteHttpURL+from cyberdrop_dl.url_objects import AbsoluteHttpURL@pytest.mark.parametrize(diff --git a/tests/test_sorter.py b/tests/test_sorter.pyindex 64e9e92c0..5a09ddc64 100644--- a/tests/test_sorter.py+++ b/tests/test_sorter.py@@ -5,7 +5,7 @@ from pathlib import Pathimport pytest-from cyberdrop_dl.utils.sorting import Sorter, _format_dest, _have_same_content, _move_file+from cyberdrop_dl.sorter import Sorter, _format_dest, _have_same_content, _move_fileDOWNLOADS = Path("/mnt/home/user/downloads/cdl/")SORT_DIR = DOWNLOADS.parent / "cdl_sorted"diff --git a/uv.lock b/uv.lockindex c17ba3f7f..bd93a360d 100644--- a/uv.lock+++ b/uv.lock@@ -743,7 +743,7 @@ wheels = [[[package]]name = "cyberdrop-dl-patched"-version = "9.1.1"+version = "9.2.1.dev0"source = { editable = "." }dependencies = [{ name = "aiodns", marker = "sys_platform != 'android'" },