Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: move crawlers to their own top level package (#780)
NTFSvolumeff25bb2e5622
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymlold mode 100755new mode 100644diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.ymlold mode 100755new mode 100644diff --git a/.github/ISSUE_TEMPLATE/new_site_request.yml b/.github/ISSUE_TEMPLATE/new_site_request.ymlindex 9aa728b41..f2fa3ba44 100644--- a/.github/ISSUE_TEMPLATE/new_site_request.yml+++ b/.github/ISSUE_TEMPLATE/new_site_request.yml@@ -71,9 +71,9 @@ body:- type: dropdownid: mimetype- multiple: trueattributes:label: What kind of content can be found on the site?+ multiple: trueoptions:- Videos / Gifs- Imagesdiff --git a/cyberdrop_dl/clients/errors.py b/cyberdrop_dl/clients/errors.pyindex 20507ab5a..476df7195 100644--- a/cyberdrop_dl/clients/errors.py+++ b/cyberdrop_dl/clients/errors.py@@ -13,8 +13,7 @@ from cyberdrop_dl.utils.constants import VALIDATION_ERROR_FOOTERif TYPE_CHECKING:from requests import Response- from cyberdrop_dl.scraper.crawler import ScrapeItem- from cyberdrop_dl.utils.data_enums_classes.url_objects import MediaItem+ from cyberdrop_dl.utils.data_enums_classes.url_objects import MediaItem, ScrapeItem# See: https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/diff --git a/cyberdrop_dl/crawlers/__init__.py b/cyberdrop_dl/crawlers/__init__.pynew file mode 100644index 000000000..e747d5df5--- /dev/null+++ b/cyberdrop_dl/crawlers/__init__.py@@ -0,0 +1,92 @@+# ruff: noqa: F401+from __future__ import annotations++from typing import TYPE_CHECKING++from cyberdrop_dl import env++from .bestprettygirl import BestPrettyGirlCrawler+from .bunkrr import BunkrrCrawler+from .bunkrr_albums_io import BunkrAlbumsIOCrawler+from .catbox import CatboxCrawler+from .chevereto import CheveretoCrawler+from .coomer import CoomerCrawler+from .crawler import Crawler+from .cyberdrop import CyberdropCrawler+from .cyberfile import CyberfileCrawler+from .dirtyship import DirtyShipCrawler+from .doodstream import DoodStreamCrawler+from .dropbox import DropboxCrawler+from .e621 import E621Crawler+from .ehentai import EHentaiCrawler+from .eightmuses import EightMusesCrawler+from .eporner import EpornerCrawler+from .erome import EromeCrawler+from .fapello import FapelloCrawler+from .fileditch import FileditchCrawler+from .generic import GenericCrawler+from .gofile import GoFileCrawler+from .google_drive import GoogleDriveCrawler+from .hotpic import HotPicCrawler+from .imagebam import ImageBamCrawler+from .imgbb import ImgBBCrawler+from .imgbox import ImgBoxCrawler+from .imgur import ImgurCrawler+from .kemono import KemonoCrawler+from .luscious import LusciousCrawler+from .mediafire import MediaFireCrawler+from .motherless import MotherlessCrawler+from .nekohouse import NekohouseCrawler+from .nhentai import NHentaiCrawler+from .nudostartv import NudoStarTVCrawler+from .omegascans import OmegaScansCrawler+from .onedrive import OneDriveCrawler+from .pimpandhost import PimpAndHostCrawler+from .pixeldrain import PixelDrainCrawler+from .pixhost import PixHostCrawler+from .pmvhaven import PMVHavenCrawler+from .pornpics import PornPicsCrawler+from .postimg import PostImgCrawler+from .realbooru import RealBooruCrawler+from .reddit import RedditCrawler+from .redgifs import RedGifsCrawler+from .rule34vault import Rule34VaultCrawler+from .rule34video import Rule34VideoCrawler+from .rule34xxx import Rule34XXXCrawler+from .rule34xyz import Rule34XYZCrawler+from .saint import SaintCrawler+from .scrolller import ScrolllerCrawler+from .send_now import SendNowCrawler+from .sendvid import SendVidCrawler+from .sex_dot_com import SexDotComCrawler+from .spankbang import SpankBangCrawler+from .streamable import StreamableCrawler+from .tiktok import TikTokCrawler+from .tokyomotion import TokioMotionCrawler+from .toonily import ToonilyCrawler+from .twitter_images import TwimgCrawler+from .wetransfer import WeTransferCrawler+from .xbunkr import XBunkrCrawler+from .xenforo import (+ AllPornComixCrawler,+ BellazonCrawler,+ CelebForumCrawler,+ F95ZoneCrawler,+ LeakedModelsCrawler,+ NudoStarCrawler,+ SimpCityCrawler,+ SocialMediaGirlsCrawler,+ TitsInTopsCrawler,+ XBunkerCrawler,+)+from .xxxbunker import XXXBunkerCrawler+from .yandex_disk import YandexDiskCrawler+from .youjizz import YouJizzCrawler++ALL_CRAWLERS: set[type[Crawler]] = {crawler for name, crawler in globals().items() if name.endswith("Crawler")}+ALL_CRAWLERS = ALL_CRAWLERS - {Crawler}+DEBUG_CRAWLERS = {SimpCityCrawler, BunkrAlbumsIOCrawler}+CRAWLERS = ALL_CRAWLERS - DEBUG_CRAWLERS++if env.ENABLE_DEBUG_CRAWLERS == "d396ab8c85fcb1fecd22c8d9b58acf944a44e6d35014e9dd39e42c9a64091eda":+ CRAWLERS.update(DEBUG_CRAWLERS)diff --git a/cyberdrop_dl/scraper/crawlers/bestprettygirl_crawler.py b/cyberdrop_dl/crawlers/bestprettygirl.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/bestprettygirl_crawler.pyrename to cyberdrop_dl/crawlers/bestprettygirl.pyindex 6d4a86184..5f99b05c3 100644--- a/cyberdrop_dl/scraper/crawlers/bestprettygirl_crawler.py+++ b/cyberdrop_dl/crawlers/bestprettygirl.py@@ -8,7 +8,7 @@ from aiolimiter import AsyncLimiterfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py b/cyberdrop_dl/crawlers/bunkrr.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/bunkrr_crawler.pyrename to cyberdrop_dl/crawlers/bunkrr.pyindex 9197a8a54..373da77e4 100644--- a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py+++ b/cyberdrop_dl/crawlers/bunkrr.py@@ -15,7 +15,7 @@ from typing import TYPE_CHECKING, ClassVar, NamedTuplefrom yarl import URLfrom cyberdrop_dl.clients.errors import NoExtensionError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils import javascriptfrom cyberdrop_dl.utils.constants import FILE_FORMATSfrom cyberdrop_dl.utils.utilities import error_handling_wrapperdiff --git a/cyberdrop_dl/scraper/crawlers/bunkrr_albums_io_crawler.py b/cyberdrop_dl/crawlers/bunkrr_albums_io.pysimilarity index 97%rename from cyberdrop_dl/scraper/crawlers/bunkrr_albums_io_crawler.pyrename to cyberdrop_dl/crawlers/bunkrr_albums_io.pyindex 445fa2794..8bc659660 100644--- a/cyberdrop_dl/scraper/crawlers/bunkrr_albums_io_crawler.py+++ b/cyberdrop_dl/crawlers/bunkrr_albums_io.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_PROFILEfrom cyberdrop_dl.utils.utilities import error_handling_wrapperdiff --git a/cyberdrop_dl/scraper/crawlers/catbox_crawler.py b/cyberdrop_dl/crawlers/catbox.pysimilarity index 94%rename from cyberdrop_dl/scraper/crawlers/catbox_crawler.pyrename to cyberdrop_dl/crawlers/catbox.pyindex a607baa52..bf5b2e31c 100644--- a/cyberdrop_dl/scraper/crawlers/catbox_crawler.py+++ b/cyberdrop_dl/crawlers/catbox.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/chevereto_crawler.py b/cyberdrop_dl/crawlers/chevereto.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/chevereto_crawler.pyrename to cyberdrop_dl/crawlers/chevereto.pyindex 0adea257f..de50d8efe 100644--- a/cyberdrop_dl/scraper/crawlers/chevereto_crawler.py+++ b/cyberdrop_dl/crawlers/chevereto.py@@ -11,7 +11,7 @@ from bs4 import BeautifulSoupfrom yarl import URLfrom cyberdrop_dl.clients.errors import PasswordProtectedError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/coomer_crawler.py b/cyberdrop_dl/crawlers/coomer.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/coomer_crawler.pyrename to cyberdrop_dl/crawlers/coomer.pyindex 95dfd10fa..5179da5c2 100644--- a/cyberdrop_dl/scraper/crawlers/coomer_crawler.py+++ b/cyberdrop_dl/crawlers/coomer.py@@ -10,7 +10,7 @@ from aiolimiter import AsyncLimiterfrom yarl import URLfrom cyberdrop_dl.clients.errors import NoExtensionError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.logger import logfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawler.py b/cyberdrop_dl/crawlers/crawler.pysimilarity index 97%rename from cyberdrop_dl/scraper/crawler.pyrename to cyberdrop_dl/crawlers/crawler.pyindex 2f5b31107..91d76a266 100644--- a/cyberdrop_dl/scraper/crawler.py+++ b/cyberdrop_dl/crawlers/crawler.py@@ -1,358 +1,358 @@-from __future__ import annotations--import asyncio-import copy-import re-from abc import ABC, abstractmethod-from dataclasses import field-from datetime import datetime-from functools import wraps-from pathlib import Path-from typing import TYPE_CHECKING, Any, ClassVar, Protocol--from aiolimiter import AsyncLimiter-from yarl import URL--from cyberdrop_dl.clients.errors import InvalidURLError-from cyberdrop_dl.downloader.downloader import Downloader-from cyberdrop_dl.utils.data_enums_classes.url_objects import MediaItem, ScrapeItem-from cyberdrop_dl.utils.database.tables.history_table import get_db_path-from cyberdrop_dl.utils.logger import log-from cyberdrop_dl.utils.utilities import get_download_path, get_filename_and_ext, remove_file_id--if TYPE_CHECKING:- from collections.abc import AsyncGenerator, Callable-- from bs4 import BeautifulSoup-- from cyberdrop_dl.clients.scraper_client import ScraperClient- from cyberdrop_dl.managers.manager import Manager--UNKNOWN_URL_PATH_MSG = "Unknown URL path"---class Post(Protocol):- number: int- id: str- title: str- date: datetime | int | None---class Crawler(ABC):- SUPPORTED_SITES: ClassVar[dict[str, list]] = {}- domain: str = None # type: ignore- primary_base_domain: URL = None # type: ignore- DEFAULT_POST_TITLE_FORMAT = "{date} - {number} - {title}"- update_unsupported = False- skip_pre_check = False- next_page_selector: str = ""- scrape_prefix = "Scraping:"- scrape_mapper_domain = ""-- def __init__(self, manager: Manager, domain: str, folder_domain: str | None = None) -> None:- self.manager = manager- self.downloader = field(init=False)- self.scraping_progress = manager.progress_manager.scraping_progress- self.client: ScraperClient = field(init=False)- self._semaphore = asyncio.Semaphore(20)- self.startup_lock = asyncio.Lock()- self.request_limiter = AsyncLimiter(10, 1)- self.ready: bool = False-- self.domain = domain- self.folder_domain = folder_domain or domain.capitalize()-- self.logged_in = field(init=False)-- self.scraped_items: list = []- self.waiting_items = 0-- @property- def allow_no_extension(self) -> bool:- return not self.manager.config_manager.settings_data.ignore_options.exclude_files_with_no_extension-- def get_filename_and_ext(self, filename: str, *args, assume_ext: str | None = None, **kwargs):- """Wrapper around `utils.get_filename_and_ext` to suppress `NoExtensionError` if `asumme_ext` is supplied.-- Does nothing unless `ignore_options.exclude_files_with_no_extension` is `False`- """- clean_filename = Path(filename).as_posix().replace("/", "-") # remove OS separators- filename_as_path = Path(clean_filename)- if assume_ext and self.allow_no_extension and not filename_as_path.suffix:- filename_as_path = filename_as_path.with_suffix(assume_ext)- new_filename, ext = get_filename_and_ext(filename_as_path.name, *args, *kwargs)- return Path(new_filename).stem, ext- return get_filename_and_ext(clean_filename, *args, *kwargs)-- async def startup(self) -> None:- """Starts the crawler."""- async with self.startup_lock:- if self.ready:- return- self.client = self.manager.client_manager.scraper_session- self.downloader = Downloader(self.manager, self.domain)- self.downloader.startup()- await self.async_startup()- self.ready = True-- async def async_startup(self) -> None: ... # noqa: B027-- async def run(self, item: ScrapeItem) -> None:- """Runs the crawler loop."""- if not item.url.host:- return- self.waiting_items += 1- async with self._semaphore:- self.waiting_items -= 1- if item.url.path_qs not in self.scraped_items:- log(f"{self.scrape_prefix} {item.url}", 20)- self.scraped_items.append(item.url.path_qs)- await self.fetch(item)- else:- log(f"Skipping {item.url} as it has already been scraped", 10)-- """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""-- @abstractmethod- async def fetch(self, scrape_item: ScrapeItem) -> None:- """Director for scraping."""- msg = "Must override in child class"- raise NotImplementedError(msg)-- async def handle_file(- self,- url: URL,- scrape_item: ScrapeItem,- filename: str,- ext: str,- *,- custom_filename: str | None = None,- debrid_link: URL | None = None,- ) -> None:- """Finishes handling the file and hands it off to the downloader."""- if custom_filename:- original_filename, filename = filename, custom_filename- elif self.domain in ["cyberdrop"]:- original_filename, filename = remove_file_id(self.manager, filename, ext)- else:- original_filename = filename-- download_folder = get_download_path(self.manager, scrape_item, self.folder_domain)- media_item = MediaItem(url, scrape_item, download_folder, filename, original_filename, debrid_link, ext=ext)-- check_complete = await self.manager.db_manager.history_table.check_complete(self.domain, url, scrape_item.url)- if check_complete:- if media_item.album_id:- await self.manager.db_manager.history_table.set_album_id(self.domain, media_item)- log(f"Skipping {url} as it has already been downloaded", 10)- self.manager.progress_manager.download_progress.add_previously_completed()- return-- if await self.check_skip_by_config(media_item):- self.manager.progress_manager.download_progress.add_skipped()- return-- self.manager.task_group.create_task(self.downloader.run(media_item))-- """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""-- async def check_skip_by_config(self, media_item: MediaItem) -> bool:- settings = self.manager.config_manager.settings_data- if (- settings.download_options.skip_referer_seen_before- and await self.manager.db_manager.temp_referer_table.check_referer(media_item.referer)- ):- log(f"Download skip {media_item.url} as referer has been seen before", 10)- return True-- assert media_item.url.host- skip_hosts = settings.ignore_options.skip_hosts- if skip_hosts and any(host in media_item.url.host for host in skip_hosts):- log(f"Download skip {media_item.url} due to skip_hosts config", 10)- return True-- only_hosts = settings.ignore_options.only_hosts- if only_hosts and not any(host in media_item.url.host for host in only_hosts):- log(f"Download skip {media_item.url} due to only_hosts config", 10)- return True-- regex_filter = self.manager.config_manager.settings_data.ignore_options.filename_regex_filter- if regex_filter and re.search(regex_filter, media_item.filename):- log(f"Download skip {media_item.url} due to filename regex filter config", 10)- return True-- return False-- def handle_external_links(self, scrape_item: ScrapeItem, reset: bool = False) -> None:- """Maps external links to the scraper class."""- if reset:- scrape_item.reset()- self.manager.task_group.create_task(self.manager.scrape_mapper.filter_and_send_to_crawler(scrape_item))-- """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""-- async def check_complete_from_referer(self, scrape_item: ScrapeItem | URL) -> bool:- """Checks if the scrape item has already been scraped."""- url = scrape_item if isinstance(scrape_item, URL) else scrape_item.url- check_complete = await self.manager.db_manager.history_table.check_complete_by_referer(self.domain, url)- if check_complete:- log(f"Skipping {url} as it has already been downloaded", 10)- self.manager.progress_manager.download_progress.add_previously_completed()- return True- return False-- async def get_album_results(self, album_id: str) -> dict[Any, Any]:- """Checks whether an album has completed given its domain and album id."""- return await self.manager.db_manager.history_table.check_album(self.domain, album_id)-- def check_album_results(self, url: URL, album_results: dict[Any, Any]) -> bool:- """Checks whether an album has completed given its domain and album id."""- url_path = get_db_path(url.with_query(""), self.domain)- if album_results and url_path in album_results and album_results[url_path] != 0:- log(f"Skipping {url} as it has already been downloaded", 10)- self.manager.progress_manager.download_progress.add_previously_completed()- return True- return False-- @staticmethod- def create_scrape_item(- parent_scrape_item: ScrapeItem,- url: URL,- new_title_part: str = "",- part_of_album: bool = False,- album_id: str | None = None,- possible_datetime: int | None = None,- add_parent: URL | None = None,- ) -> ScrapeItem:- """Creates a scrape item."""- scrape_item = copy.deepcopy(parent_scrape_item)- scrape_item.url = url- if add_parent:- scrape_item.parents.append(add_parent)- if new_title_part:- scrape_item.add_to_parent_title(new_title_part)- scrape_item.part_of_album = part_of_album or scrape_item.part_of_album- scrape_item.possible_datetime = possible_datetime or scrape_item.possible_datetime- scrape_item.album_id = album_id or scrape_item.album_id- return scrape_item-- def create_title(self, title: str, album_id: str | None = None, thread_id: int | None = None) -> str:- """Creates the title for the scrape item."""- download_options = self.manager.config_manager.settings_data.download_options- if not title:- title = "Untitled"-- title = title.strip()- if download_options.include_album_id_in_folder_name and album_id:- title = f"{title} {album_id}"-- if download_options.include_thread_id_in_folder_name and thread_id:- title = f"{title} {thread_id}"-- if not download_options.remove_domains_from_folder_names:- title = f"{title} ({self.folder_domain})"-- while True:- title = title.replace(" ", " ")- if " " not in title:- break- return title-- def add_separate_post_title(self, scrape_item: ScrapeItem, post: Post) -> None:- if not self.manager.config_manager.settings_data.download_options.separate_posts:- return- title_format = self.manager.config_manager.settings_data.download_options.separate_posts_format- if title_format.casefold() == "{default}":- title_format = self.DEFAULT_POST_TITLE_FORMAT- date = post.date- if isinstance(post.date, int):- date = datetime.fromtimestamp(date) # type: ignore- if isinstance(date, datetime):- date = date.isoformat()- id = "Unknown" if post.id is None else post.id- title = "Untitled" if post.title is None else post.title- date = "NO_DATE" if date is None else date- title = title_format.format(id=id, number=id, date=date, title=title)- scrape_item.add_to_parent_title(title)-- def parse_url(self, link_str: str, relative_to: URL | None = None, *, trim: bool = True) -> URL:- try:- assert link_str- assert isinstance(link_str, str)- link_str = clean_link_str(link_str)- encoded = "%" in link_str- base = relative_to or self.primary_base_domain- new_url = URL(link_str, encoded=encoded)- except (AssertionError, AttributeError, ValueError, TypeError) as e:- raise InvalidURLError(str(e), url=link_str) from e- if not new_url.absolute:- new_url = base.join(new_url)- if not new_url.scheme:- new_url = new_url.with_scheme(base.scheme or "https")- if not trim:- return new_url- return remove_trailing_slash(new_url)-- def update_cookies(self, cookies: dict, url: URL | None = None) -> None:- """Update cookies for the provided URL-- If `url` is `None`, defaults to `self.primary_base_domain`- """- response_url = url or self.primary_base_domain- self.client.client_manager.cookies.update_cookies(cookies, response_url)-- async def web_pager(self, url: URL, next_page_selector: str = "") -> AsyncGenerator[BeautifulSoup]:- """Generator of website pages."""- page_url = url- next_page_selector = next_page_selector or self.next_page_selector- while True:- async with self.request_limiter:- soup: BeautifulSoup = await self.client.get_soup(self.domain, page_url)- yield soup- if not next_page_selector:- return- next_page = soup.select_one(next_page_selector)- page_url_str: str | None = next_page.get("href") if next_page else None # type: ignore- if not page_url_str:- break- page_url = self.parse_url(page_url_str)---def remove_trailing_slash(url: URL) -> URL:- if url.name or url.path == "/":- return url- return url.parent.with_fragment(url.fragment).with_query(url.query)---def create_task_id(func: Callable) -> Callable:- """Wrapper handles task_id creation and removal for ScrapeItems"""-- @wraps(func)- async def wrapper(self: Crawler, *args, **kwargs):- scrape_item: ScrapeItem = args[0]- task_id = self.scraping_progress.add_task(scrape_item.url)- try:- if not self.skip_pre_check:- pre_check_scrape_item(scrape_item)- return await func(self, *args, **kwargs)- except ValueError:- log(f"Scrape Failed: {UNKNOWN_URL_PATH_MSG}: {scrape_item.url}", 40)- self.manager.progress_manager.scrape_stats_progress.add_failure(UNKNOWN_URL_PATH_MSG)- await self.manager.log_manager.write_scrape_error_log(scrape_item.url, UNKNOWN_URL_PATH_MSG)- finally:- self.scraping_progress.remove_task(task_id)-- return wrapper---def pre_check_scrape_item(scrape_item: ScrapeItem) -> None:- if scrape_item.url.path == "/":- raise ValueError---def clean_link_str(link_str: str) -> str:- if "?" in link_str:- parts, query = link_str.split("?", 1)- query = query.replace("+", "%20")- return f"{parts}?{query}"- return link_str+from __future__ import annotations++import asyncio+import copy+import re+from abc import ABC, abstractmethod+from dataclasses import field+from datetime import datetime+from functools import wraps+from pathlib import Path+from typing import TYPE_CHECKING, Any, ClassVar, Protocol++from aiolimiter import AsyncLimiter+from yarl import URL++from cyberdrop_dl.clients.errors import InvalidURLError+from cyberdrop_dl.downloader.downloader import Downloader+from cyberdrop_dl.utils.data_enums_classes.url_objects import MediaItem, ScrapeItem+from cyberdrop_dl.utils.database.tables.history_table import get_db_path+from cyberdrop_dl.utils.logger import log+from cyberdrop_dl.utils.utilities import get_download_path, get_filename_and_ext, remove_file_id++if TYPE_CHECKING:+ from collections.abc import AsyncGenerator, Callable++ from bs4 import BeautifulSoup++ from cyberdrop_dl.clients.scraper_client import ScraperClient+ from cyberdrop_dl.managers.manager import Manager++UNKNOWN_URL_PATH_MSG = "Unknown URL path"+++class Post(Protocol):+ number: int+ id: str+ title: str+ date: datetime | int | None+++class Crawler(ABC):+ SUPPORTED_SITES: ClassVar[dict[str, list]] = {}+ domain: str = None # type: ignore+ primary_base_domain: URL = None # type: ignore+ DEFAULT_POST_TITLE_FORMAT = "{date} - {number} - {title}"+ update_unsupported = False+ skip_pre_check = False+ next_page_selector: str = ""+ scrape_prefix = "Scraping:"+ scrape_mapper_domain = ""++ def __init__(self, manager: Manager, domain: str, folder_domain: str | None = None) -> None:+ self.manager = manager+ self.downloader = field(init=False)+ self.scraping_progress = manager.progress_manager.scraping_progress+ self.client: ScraperClient = field(init=False)+ self._semaphore = asyncio.Semaphore(20)+ self.startup_lock = asyncio.Lock()+ self.request_limiter = AsyncLimiter(10, 1)+ self.ready: bool = False++ self.domain = domain+ self.folder_domain = folder_domain or domain.capitalize()++ self.logged_in = field(init=False)++ self.scraped_items: list = []+ self.waiting_items = 0++ @property+ def allow_no_extension(self) -> bool:+ return not self.manager.config_manager.settings_data.ignore_options.exclude_files_with_no_extension++ def get_filename_and_ext(self, filename: str, *args, assume_ext: str | None = None, **kwargs):+ """Wrapper around `utils.get_filename_and_ext` to suppress `NoExtensionError` if `asumme_ext` is supplied.++ Does nothing unless `ignore_options.exclude_files_with_no_extension` is `False`+ """+ clean_filename = Path(filename).as_posix().replace("/", "-") # remove OS separators+ filename_as_path = Path(clean_filename)+ if assume_ext and self.allow_no_extension and not filename_as_path.suffix:+ filename_as_path = filename_as_path.with_suffix(assume_ext)+ new_filename, ext = get_filename_and_ext(filename_as_path.name, *args, *kwargs)+ return Path(new_filename).stem, ext+ return get_filename_and_ext(clean_filename, *args, *kwargs)++ async def startup(self) -> None:+ """Starts the crawler."""+ async with self.startup_lock:+ if self.ready:+ return+ self.client = self.manager.client_manager.scraper_session+ self.downloader = Downloader(self.manager, self.domain)+ self.downloader.startup()+ await self.async_startup()+ self.ready = True++ async def async_startup(self) -> None: ... # noqa: B027++ async def run(self, item: ScrapeItem) -> None:+ """Runs the crawler loop."""+ if not item.url.host:+ return+ self.waiting_items += 1+ async with self._semaphore:+ self.waiting_items -= 1+ if item.url.path_qs not in self.scraped_items:+ log(f"{self.scrape_prefix} {item.url}", 20)+ self.scraped_items.append(item.url.path_qs)+ await self.fetch(item)+ else:+ log(f"Skipping {item.url} as it has already been scraped", 10)++ """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""++ @abstractmethod+ async def fetch(self, scrape_item: ScrapeItem) -> None:+ """Director for scraping."""+ msg = "Must override in child class"+ raise NotImplementedError(msg)++ async def handle_file(+ self,+ url: URL,+ scrape_item: ScrapeItem,+ filename: str,+ ext: str,+ *,+ custom_filename: str | None = None,+ debrid_link: URL | None = None,+ ) -> None:+ """Finishes handling the file and hands it off to the downloader."""+ if custom_filename:+ original_filename, filename = filename, custom_filename+ elif self.domain in ["cyberdrop"]:+ original_filename, filename = remove_file_id(self.manager, filename, ext)+ else:+ original_filename = filename++ download_folder = get_download_path(self.manager, scrape_item, self.folder_domain)+ media_item = MediaItem(url, scrape_item, download_folder, filename, original_filename, debrid_link, ext=ext)++ check_complete = await self.manager.db_manager.history_table.check_complete(self.domain, url, scrape_item.url)+ if check_complete:+ if media_item.album_id:+ await self.manager.db_manager.history_table.set_album_id(self.domain, media_item)+ log(f"Skipping {url} as it has already been downloaded", 10)+ self.manager.progress_manager.download_progress.add_previously_completed()+ return++ if await self.check_skip_by_config(media_item):+ self.manager.progress_manager.download_progress.add_skipped()+ return++ self.manager.task_group.create_task(self.downloader.run(media_item))++ """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""++ async def check_skip_by_config(self, media_item: MediaItem) -> bool:+ settings = self.manager.config_manager.settings_data+ if (+ settings.download_options.skip_referer_seen_before+ and await self.manager.db_manager.temp_referer_table.check_referer(media_item.referer)+ ):+ log(f"Download skip {media_item.url} as referer has been seen before", 10)+ return True++ assert media_item.url.host+ skip_hosts = settings.ignore_options.skip_hosts+ if skip_hosts and any(host in media_item.url.host for host in skip_hosts):+ log(f"Download skip {media_item.url} due to skip_hosts config", 10)+ return True++ only_hosts = settings.ignore_options.only_hosts+ if only_hosts and not any(host in media_item.url.host for host in only_hosts):+ log(f"Download skip {media_item.url} due to only_hosts config", 10)+ return True++ regex_filter = self.manager.config_manager.settings_data.ignore_options.filename_regex_filter+ if regex_filter and re.search(regex_filter, media_item.filename):+ log(f"Download skip {media_item.url} due to filename regex filter config", 10)+ return True++ return False++ def handle_external_links(self, scrape_item: ScrapeItem, reset: bool = False) -> None:+ """Maps external links to the scraper class."""+ if reset:+ scrape_item.reset()+ self.manager.task_group.create_task(self.manager.scrape_mapper.filter_and_send_to_crawler(scrape_item))++ """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""++ async def check_complete_from_referer(self, scrape_item: ScrapeItem | URL) -> bool:+ """Checks if the scrape item has already been scraped."""+ url = scrape_item if isinstance(scrape_item, URL) else scrape_item.url+ check_complete = await self.manager.db_manager.history_table.check_complete_by_referer(self.domain, url)+ if check_complete:+ log(f"Skipping {url} as it has already been downloaded", 10)+ self.manager.progress_manager.download_progress.add_previously_completed()+ return True+ return False++ async def get_album_results(self, album_id: str) -> dict[Any, Any]:+ """Checks whether an album has completed given its domain and album id."""+ return await self.manager.db_manager.history_table.check_album(self.domain, album_id)++ def check_album_results(self, url: URL, album_results: dict[Any, Any]) -> bool:+ """Checks whether an album has completed given its domain and album id."""+ url_path = get_db_path(url.with_query(""), self.domain)+ if album_results and url_path in album_results and album_results[url_path] != 0:+ log(f"Skipping {url} as it has already been downloaded", 10)+ self.manager.progress_manager.download_progress.add_previously_completed()+ return True+ return False++ @staticmethod+ def create_scrape_item(+ parent_scrape_item: ScrapeItem,+ url: URL,+ new_title_part: str = "",+ part_of_album: bool = False,+ album_id: str | None = None,+ possible_datetime: int | None = None,+ add_parent: URL | None = None,+ ) -> ScrapeItem:+ """Creates a scrape item."""+ scrape_item = copy.deepcopy(parent_scrape_item)+ scrape_item.url = url+ if add_parent:+ scrape_item.parents.append(add_parent)+ if new_title_part:+ scrape_item.add_to_parent_title(new_title_part)+ scrape_item.part_of_album = part_of_album or scrape_item.part_of_album+ scrape_item.possible_datetime = possible_datetime or scrape_item.possible_datetime+ scrape_item.album_id = album_id or scrape_item.album_id+ return scrape_item++ def create_title(self, title: str, album_id: str | None = None, thread_id: int | None = None) -> str:+ """Creates the title for the scrape item."""+ download_options = self.manager.config_manager.settings_data.download_options+ if not title:+ title = "Untitled"++ title = title.strip()+ if download_options.include_album_id_in_folder_name and album_id:+ title = f"{title} {album_id}"++ if download_options.include_thread_id_in_folder_name and thread_id:+ title = f"{title} {thread_id}"++ if not download_options.remove_domains_from_folder_names:+ title = f"{title} ({self.folder_domain})"++ while True:+ title = title.replace(" ", " ")+ if " " not in title:+ break+ return title++ def add_separate_post_title(self, scrape_item: ScrapeItem, post: Post) -> None:+ if not self.manager.config_manager.settings_data.download_options.separate_posts:+ return+ title_format = self.manager.config_manager.settings_data.download_options.separate_posts_format+ if title_format.casefold() == "{default}":+ title_format = self.DEFAULT_POST_TITLE_FORMAT+ date = post.date+ if isinstance(post.date, int):+ date = datetime.fromtimestamp(date) # type: ignore+ if isinstance(date, datetime):+ date = date.isoformat()+ id = "Unknown" if post.id is None else post.id+ title = "Untitled" if post.title is None else post.title+ date = "NO_DATE" if date is None else date+ title = title_format.format(id=id, number=id, date=date, title=title)+ scrape_item.add_to_parent_title(title)++ def parse_url(self, link_str: str, relative_to: URL | None = None, *, trim: bool = True) -> URL:+ try:+ assert link_str+ assert isinstance(link_str, str)+ link_str = clean_link_str(link_str)+ encoded = "%" in link_str+ base = relative_to or self.primary_base_domain+ new_url = URL(link_str, encoded=encoded)+ except (AssertionError, AttributeError, ValueError, TypeError) as e:+ raise InvalidURLError(str(e), url=link_str) from e+ if not new_url.absolute:+ new_url = base.join(new_url)+ if not new_url.scheme:+ new_url = new_url.with_scheme(base.scheme or "https")+ if not trim:+ return new_url+ return remove_trailing_slash(new_url)++ def update_cookies(self, cookies: dict, url: URL | None = None) -> None:+ """Update cookies for the provided URL++ If `url` is `None`, defaults to `self.primary_base_domain`+ """+ response_url = url or self.primary_base_domain+ self.client.client_manager.cookies.update_cookies(cookies, response_url)++ async def web_pager(self, url: URL, next_page_selector: str = "") -> AsyncGenerator[BeautifulSoup]:+ """Generator of website pages."""+ page_url = url+ next_page_selector = next_page_selector or self.next_page_selector+ while True:+ async with self.request_limiter:+ soup: BeautifulSoup = await self.client.get_soup(self.domain, page_url)+ yield soup+ if not next_page_selector:+ return+ next_page = soup.select_one(next_page_selector)+ page_url_str: str | None = next_page.get("href") if next_page else None # type: ignore+ if not page_url_str:+ break+ page_url = self.parse_url(page_url_str)+++def remove_trailing_slash(url: URL) -> URL:+ if url.name or url.path == "/":+ return url+ return url.parent.with_fragment(url.fragment).with_query(url.query)+++def create_task_id(func: Callable) -> Callable:+ """Wrapper handles task_id creation and removal for ScrapeItems"""++ @wraps(func)+ async def wrapper(self: Crawler, *args, **kwargs):+ scrape_item: ScrapeItem = args[0]+ task_id = self.scraping_progress.add_task(scrape_item.url)+ try:+ if not self.skip_pre_check:+ pre_check_scrape_item(scrape_item)+ return await func(self, *args, **kwargs)+ except ValueError:+ log(f"Scrape Failed: {UNKNOWN_URL_PATH_MSG}: {scrape_item.url}", 40)+ self.manager.progress_manager.scrape_stats_progress.add_failure(UNKNOWN_URL_PATH_MSG)+ await self.manager.log_manager.write_scrape_error_log(scrape_item.url, UNKNOWN_URL_PATH_MSG)+ finally:+ self.scraping_progress.remove_task(task_id)++ return wrapper+++def pre_check_scrape_item(scrape_item: ScrapeItem) -> None:+ if scrape_item.url.path == "/":+ raise ValueError+++def clean_link_str(link_str: str) -> str:+ if "?" in link_str:+ parts, query = link_str.split("?", 1)+ query = query.replace("+", "%20")+ return f"{parts}?{query}"+ return link_strdiff --git a/cyberdrop_dl/scraper/crawlers/cyberdrop_crawler.py b/cyberdrop_dl/crawlers/cyberdrop.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/cyberdrop_crawler.pyrename to cyberdrop_dl/crawlers/cyberdrop.pyindex cac868443..1cd35a752 100644--- a/cyberdrop_dl/scraper/crawlers/cyberdrop_crawler.py+++ b/cyberdrop_dl/crawlers/cyberdrop.py@@ -10,7 +10,7 @@ from bs4 import BeautifulSoupfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/cyberfile_crawler.py b/cyberdrop_dl/crawlers/cyberfile.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/cyberfile_crawler.pyrename to cyberdrop_dl/crawlers/cyberfile.pyindex 26ed3a640..7e1a15190 100644--- a/cyberdrop_dl/scraper/crawlers/cyberfile_crawler.py+++ b/cyberdrop_dl/crawlers/cyberfile.py@@ -10,7 +10,7 @@ from bs4 import BeautifulSoupfrom yarl import URLfrom cyberdrop_dl.clients.errors import PasswordProtectedError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/dirtyship_crawler.py b/cyberdrop_dl/crawlers/dirtyship.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/dirtyship_crawler.pyrename to cyberdrop_dl/crawlers/dirtyship.pyindex 644b42d64..bfd512dcb 100644--- a/cyberdrop_dl/scraper/crawlers/dirtyship_crawler.py+++ b/cyberdrop_dl/crawlers/dirtyship.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, NamedTuplefrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/doodstream_crawler.py b/cyberdrop_dl/crawlers/doodstream.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/doodstream_crawler.pyrename to cyberdrop_dl/crawlers/doodstream.pyindex 24ea2dfb5..21697d03a 100644--- a/cyberdrop_dl/scraper/crawlers/doodstream_crawler.py+++ b/cyberdrop_dl/crawlers/doodstream.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, ClassVarfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/dropbox_crawler.py b/cyberdrop_dl/crawlers/dropbox.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/dropbox_crawler.pyrename to cyberdrop_dl/crawlers/dropbox.pyindex 2e69ae051..6ac63faec 100644--- a/cyberdrop_dl/scraper/crawlers/dropbox_crawler.py+++ b/cyberdrop_dl/crawlers/dropbox.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/e621_crawler.py b/cyberdrop_dl/crawlers/e621.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/e621_crawler.pyrename to cyberdrop_dl/crawlers/e621.pyindex 6c3536c97..0d37f4588 100644--- a/cyberdrop_dl/scraper/crawlers/e621_crawler.py+++ b/cyberdrop_dl/crawlers/e621.py@@ -9,7 +9,7 @@ from yarl import URLfrom cyberdrop_dl import __version__from cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/ehentai_crawler.py b/cyberdrop_dl/crawlers/ehentai.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/ehentai_crawler.pyrename to cyberdrop_dl/crawlers/ehentai.pyindex 8da6b23bd..12f7973f1 100644--- a/cyberdrop_dl/scraper/crawlers/ehentai_crawler.py+++ b/cyberdrop_dl/crawlers/ehentai.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/eightmuses_crawler.py b/cyberdrop_dl/crawlers/eightmuses.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/eightmuses_crawler.pyrename to cyberdrop_dl/crawlers/eightmuses.pyindex 768c12b93..74b0dd339 100644--- a/cyberdrop_dl/scraper/crawlers/eightmuses_crawler.py+++ b/cyberdrop_dl/crawlers/eightmuses.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/eporner_crawler.py b/cyberdrop_dl/crawlers/eporner.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/eporner_crawler.pyrename to cyberdrop_dl/crawlers/eporner.pyindex 4f3ade64f..925e5c1a7 100644--- a/cyberdrop_dl/scraper/crawlers/eporner_crawler.py+++ b/cyberdrop_dl/crawlers/eporner.py@@ -10,7 +10,7 @@ from pydantic import ByteSizefrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils import javascriptfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.logger import log_debugdiff --git a/cyberdrop_dl/scraper/crawlers/erome_crawler.py b/cyberdrop_dl/crawlers/erome.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/erome_crawler.pyrename to cyberdrop_dl/crawlers/erome.pyindex 2af20bbae..6217d9b6d 100644--- a/cyberdrop_dl/scraper/crawlers/erome_crawler.py+++ b/cyberdrop_dl/crawlers/erome.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/fapello_crawler.py b/cyberdrop_dl/crawlers/fapello.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/fapello_crawler.pyrename to cyberdrop_dl/crawlers/fapello.pyindex 71270cd8b..a0afc8552 100644--- a/cyberdrop_dl/scraper/crawlers/fapello_crawler.py+++ b/cyberdrop_dl/crawlers/fapello.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom aiolimiter import AsyncLimiterfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/fileditch_crawler.py b/cyberdrop_dl/crawlers/fileditch.pysimilarity index 96%rename from cyberdrop_dl/scraper/crawlers/fileditch_crawler.pyrename to cyberdrop_dl/crawlers/fileditch.pyindex 203635363..2a6be0c65 100644--- a/cyberdrop_dl/scraper/crawlers/fileditch_crawler.py+++ b/cyberdrop_dl/crawlers/fileditch.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/generic_crawler.py b/cyberdrop_dl/crawlers/generic.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/generic_crawler.pyrename to cyberdrop_dl/crawlers/generic.pyindex a63b0aaf1..047df8114 100644--- a/cyberdrop_dl/scraper/crawlers/generic_crawler.py+++ b/cyberdrop_dl/crawlers/generic.py@@ -7,7 +7,7 @@ from pathlib import Pathfrom typing import TYPE_CHECKINGfrom cyberdrop_dl.clients.errors import InvalidContentTypeError, NoExtensionError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.scraper.filters import has_valid_extensionfrom cyberdrop_dl.utils.logger import logfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py b/cyberdrop_dl/crawlers/gofile.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/gofile_crawler.pyrename to cyberdrop_dl/crawlers/gofile.pyindex 18a293fbd..ecd5a2f0a 100644--- a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py+++ b/cyberdrop_dl/crawlers/gofile.py@@ -10,7 +10,7 @@ from aiolimiter import AsyncLimiterfrom yarl import URLfrom cyberdrop_dl.clients.errors import DownloadError, PasswordProtectedError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapperdiff --git a/cyberdrop_dl/scraper/crawlers/google_drive_crawler.py b/cyberdrop_dl/crawlers/google_drive.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/google_drive_crawler.pyrename to cyberdrop_dl/crawlers/google_drive.pyindex 62fc95d36..e4c56b2c2 100644--- a/cyberdrop_dl/scraper/crawlers/google_drive_crawler.py+++ b/cyberdrop_dl/crawlers/google_drive.py@@ -42,7 +42,7 @@ from dateutil import parserfrom yarl import URLfrom cyberdrop_dl.clients.errors import DownloadError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/hotpic_crawler.py b/cyberdrop_dl/crawlers/hotpic.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/hotpic_crawler.pyrename to cyberdrop_dl/crawlers/hotpic.pyindex b5b00cf0b..6c8df883e 100644--- a/cyberdrop_dl/scraper/crawlers/hotpic_crawler.py+++ b/cyberdrop_dl/crawlers/hotpic.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, ClassVarfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/imagebam_crawler.py b/cyberdrop_dl/crawlers/imagebam.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/imagebam_crawler.pyrename to cyberdrop_dl/crawlers/imagebam.pyindex f197f73f3..eb5e70cb8 100644--- a/cyberdrop_dl/scraper/crawlers/imagebam_crawler.py+++ b/cyberdrop_dl/crawlers/imagebam.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/imgbb_crawler.py b/cyberdrop_dl/crawlers/imgbb.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/imgbb_crawler.pyrename to cyberdrop_dl/crawlers/imgbb.pyindex c6491c25b..b6cebc97e 100644--- a/cyberdrop_dl/scraper/crawlers/imgbb_crawler.py+++ b/cyberdrop_dl/crawlers/imgbb.py@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING, ClassVarfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py b/cyberdrop_dl/crawlers/imgbox.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/imgbox_crawler.pyrename to cyberdrop_dl/crawlers/imgbox.pyindex 023a4b582..2dc6b10e4 100644--- a/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py+++ b/cyberdrop_dl/crawlers/imgbox.py@@ -7,7 +7,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/imgur_crawler.py b/cyberdrop_dl/crawlers/imgur.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/imgur_crawler.pyrename to cyberdrop_dl/crawlers/imgur.pyindex c4cac29fb..09b2375ac 100644--- a/cyberdrop_dl/scraper/crawlers/imgur_crawler.py+++ b/cyberdrop_dl/crawlers/imgur.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import LoginError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/kemono_crawler.py b/cyberdrop_dl/crawlers/kemono.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/kemono_crawler.pyrename to cyberdrop_dl/crawlers/kemono.pyindex 132a9b6e0..f02a3630d 100644--- a/cyberdrop_dl/scraper/crawlers/kemono_crawler.py+++ b/cyberdrop_dl/crawlers/kemono.py@@ -10,7 +10,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import NoExtensionError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.logger import logfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/luscious_crawler.py b/cyberdrop_dl/crawlers/luscious.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/luscious_crawler.pyrename to cyberdrop_dl/crawlers/luscious.pyindex 090454fcc..a16423405 100644--- a/cyberdrop_dl/scraper/crawlers/luscious_crawler.py+++ b/cyberdrop_dl/crawlers/luscious.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/mediafire_crawler.py b/cyberdrop_dl/crawlers/mediafire.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/mediafire_crawler.pyrename to cyberdrop_dl/crawlers/mediafire.pyindex a7e21175d..2ac28fdfc 100644--- a/cyberdrop_dl/scraper/crawlers/mediafire_crawler.py+++ b/cyberdrop_dl/crawlers/mediafire.py@@ -9,7 +9,7 @@ from mediafire import MediaFireApi, apifrom yarl import URLfrom cyberdrop_dl.clients.errors import MediaFireError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/motherless_crawler.py b/cyberdrop_dl/crawlers/motherless.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/motherless_crawler.pyrename to cyberdrop_dl/crawlers/motherless.pyindex 9c088dd2d..46f4ce3cb 100644--- a/cyberdrop_dl/scraper/crawlers/motherless_crawler.py+++ b/cyberdrop_dl/crawlers/motherless.py@@ -7,7 +7,7 @@ from aiolimiter import AsyncLimiterfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/nekohouse_crawler.py b/cyberdrop_dl/crawlers/nekohouse.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/nekohouse_crawler.pyrename to cyberdrop_dl/crawlers/nekohouse.pyindex beb5bef91..9bbc663f9 100644--- a/cyberdrop_dl/scraper/crawlers/nekohouse_crawler.py+++ b/cyberdrop_dl/crawlers/nekohouse.py@@ -9,7 +9,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import NoExtensionError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILEfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/nhentai_crawler.py b/cyberdrop_dl/crawlers/nhentai.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/nhentai_crawler.pyrename to cyberdrop_dl/crawlers/nhentai.pyindex 99f64c5d4..0c584dfc6 100644--- a/cyberdrop_dl/scraper/crawlers/nhentai_crawler.py+++ b/cyberdrop_dl/crawlers/nhentai.py@@ -7,7 +7,7 @@ from aiolimiter import AsyncLimiterfrom yarl import URLfrom cyberdrop_dl.clients.errors import LoginError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.logger import log_debugfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/nudostartv_crawler.py b/cyberdrop_dl/crawlers/nudostartv.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/nudostartv_crawler.pyrename to cyberdrop_dl/crawlers/nudostartv.pyindex 677ecff5e..aa2916ac5 100644--- a/cyberdrop_dl/scraper/crawlers/nudostartv_crawler.py+++ b/cyberdrop_dl/crawlers/nudostartv.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUMfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/omegascans_crawler.py b/cyberdrop_dl/crawlers/omegascans.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/omegascans_crawler.pyrename to cyberdrop_dl/crawlers/omegascans.pyindex a1ce50063..a2c40bae5 100644--- a/cyberdrop_dl/scraper/crawlers/omegascans_crawler.py+++ b/cyberdrop_dl/crawlers/omegascans.py@@ -7,7 +7,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/onedrive_crawler.py b/cyberdrop_dl/crawlers/onedrive.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/onedrive_crawler.pyrename to cyberdrop_dl/crawlers/onedrive.pyindex b9e3a3ef5..073cb1ff2 100644--- a/cyberdrop_dl/scraper/crawlers/onedrive_crawler.py+++ b/cyberdrop_dl/crawlers/onedrive.py@@ -14,7 +14,7 @@ from typing import TYPE_CHECKING, Any, ClassVar, Selffrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/pimpandhost_crawler.py b/cyberdrop_dl/crawlers/pimpandhost.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/pimpandhost_crawler.pyrename to cyberdrop_dl/crawlers/pimpandhost.pyindex 8b451e859..d401f2c13 100644--- a/cyberdrop_dl/scraper/crawlers/pimpandhost_crawler.py+++ b/cyberdrop_dl/crawlers/pimpandhost.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.py b/cyberdrop_dl/crawlers/pixeldrain.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.pyrename to cyberdrop_dl/crawlers/pixeldrain.pyindex 99dede456..01cae5a5a 100644--- a/cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.py+++ b/cyberdrop_dl/crawlers/pixeldrain.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import DownloadError, NoExtensionError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/pixhost_crawler.py b/cyberdrop_dl/crawlers/pixhost.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/pixhost_crawler.pyrename to cyberdrop_dl/crawlers/pixhost.pyindex 0604ae6b5..3abe91598 100644--- a/cyberdrop_dl/scraper/crawlers/pixhost_crawler.py+++ b/cyberdrop_dl/crawlers/pixhost.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/pmvhaven_crawler.py b/cyberdrop_dl/crawlers/pmvhaven.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/pmvhaven_crawler.pyrename to cyberdrop_dl/crawlers/pmvhaven.pyindex 4f36b0cd6..fa7465605 100644--- a/cyberdrop_dl/scraper/crawlers/pmvhaven_crawler.py+++ b/cyberdrop_dl/crawlers/pmvhaven.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils import javascriptfrom cyberdrop_dl.utils.logger import log_debugfrom cyberdrop_dl.utils.utilities import error_handling_wrapperdiff --git a/cyberdrop_dl/scraper/crawlers/pornpics_crawler.py b/cyberdrop_dl/crawlers/pornpics.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/pornpics_crawler.pyrename to cyberdrop_dl/crawlers/pornpics.pyindex 73a14a6d1..08c29e788 100644--- a/cyberdrop_dl/scraper/crawlers/pornpics_crawler.py+++ b/cyberdrop_dl/crawlers/pornpics.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/postimg_crawler.py b/cyberdrop_dl/crawlers/postimg.pysimilarity index 97%rename from cyberdrop_dl/scraper/crawlers/postimg_crawler.pyrename to cyberdrop_dl/crawlers/postimg.pyindex 952f748f2..cce1a27af 100644--- a/cyberdrop_dl/scraper/crawlers/postimg_crawler.py+++ b/cyberdrop_dl/crawlers/postimg.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/realbooru_crawler.py b/cyberdrop_dl/crawlers/realbooru.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/realbooru_crawler.pyrename to cyberdrop_dl/crawlers/realbooru.pyindex 4083357df..ec05ea9c9 100644--- a/cyberdrop_dl/scraper/crawlers/realbooru_crawler.py+++ b/cyberdrop_dl/crawlers/realbooru.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/realdebrid_crawler.py b/cyberdrop_dl/crawlers/realdebrid.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/realdebrid_crawler.pyrename to cyberdrop_dl/crawlers/realdebrid.pyindex 449a3a687..34c5b245a 100644--- a/cyberdrop_dl/scraper/crawlers/realdebrid_crawler.py+++ b/cyberdrop_dl/crawlers/realdebrid.py@@ -6,8 +6,8 @@ from aiolimiter import AsyncLimiterfrom multidict import MultiDictfrom yarl import URL+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.managers.real_debrid.api import RATE_LIMIT-from cyberdrop_dl.scraper.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUMfrom cyberdrop_dl.utils.logger import logfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/reddit_crawler.py b/cyberdrop_dl/crawlers/reddit.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/reddit_crawler.pyrename to cyberdrop_dl/crawlers/reddit.pyindex 4e7f26f17..05fc492e2 100644--- a/cyberdrop_dl/scraper/crawlers/reddit_crawler.py+++ b/cyberdrop_dl/crawlers/reddit.py@@ -13,7 +13,7 @@ from yarl import URLfrom cyberdrop_dl.clients.errors import LoginError, NoExtensionError, ScrapeErrorfrom cyberdrop_dl.clients.scraper_client import cache_control_manager-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.logger import log, log_debugfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/redgifs_crawler.py b/cyberdrop_dl/crawlers/redgifs.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/redgifs_crawler.pyrename to cyberdrop_dl/crawlers/redgifs.pyindex b946ff9d6..e738bef47 100644--- a/cyberdrop_dl/scraper/crawlers/redgifs_crawler.py+++ b/cyberdrop_dl/crawlers/redgifs.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/rule34vault_crawler.py b/cyberdrop_dl/crawlers/rule34vault.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/rule34vault_crawler.pyrename to cyberdrop_dl/crawlers/rule34vault.pyindex c6c1d9f08..4c4f9d2d6 100644--- a/cyberdrop_dl/scraper/crawlers/rule34vault_crawler.py+++ b/cyberdrop_dl/crawlers/rule34vault.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/rule34video_crawler.py b/cyberdrop_dl/crawlers/rule34video.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/rule34video_crawler.pyrename to cyberdrop_dl/crawlers/rule34video.pyindex 44ce6a4e5..c6c5642bf 100644--- a/cyberdrop_dl/scraper/crawlers/rule34video_crawler.py+++ b/cyberdrop_dl/crawlers/rule34video.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, NamedTuplefrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils import javascriptfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.logger import log_debugdiff --git a/cyberdrop_dl/scraper/crawlers/rule34xxx_crawler.py b/cyberdrop_dl/crawlers/rule34xxx.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/rule34xxx_crawler.pyrename to cyberdrop_dl/crawlers/rule34xxx.pyindex 44aa02b4f..7fa932a84 100644--- a/cyberdrop_dl/scraper/crawlers/rule34xxx_crawler.py+++ b/cyberdrop_dl/crawlers/rule34xxx.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/rule34xyz_crawler.py b/cyberdrop_dl/crawlers/rule34xyz.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/rule34xyz_crawler.pyrename to cyberdrop_dl/crawlers/rule34xyz.pyindex 8aa87f0a3..03901ab08 100644--- a/cyberdrop_dl/scraper/crawlers/rule34xyz_crawler.py+++ b/cyberdrop_dl/crawlers/rule34xyz.py@@ -7,7 +7,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/saint_crawler.py b/cyberdrop_dl/crawlers/saint.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/saint_crawler.pyrename to cyberdrop_dl/crawlers/saint.pyindex a6226e30b..6d4e2219a 100644--- a/cyberdrop_dl/scraper/crawlers/saint_crawler.py+++ b/cyberdrop_dl/crawlers/saint.py@@ -7,7 +7,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/scrolller_crawler.py b/cyberdrop_dl/crawlers/scrolller.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/scrolller_crawler.pyrename to cyberdrop_dl/crawlers/scrolller.pyindex e0568236d..a4bf36ab3 100644--- a/cyberdrop_dl/scraper/crawlers/scrolller_crawler.py+++ b/cyberdrop_dl/crawlers/scrolller.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/send_now_crawler.py b/cyberdrop_dl/crawlers/send_now.pysimilarity index 96%rename from cyberdrop_dl/scraper/crawlers/send_now_crawler.pyrename to cyberdrop_dl/crawlers/send_now.pyindex cf83362ba..e84e0e50b 100644--- a/cyberdrop_dl/scraper/crawlers/send_now_crawler.py+++ b/cyberdrop_dl/crawlers/send_now.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapperif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/sendvid_crawler.py b/cyberdrop_dl/crawlers/sendvid.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/sendvid_crawler.pyrename to cyberdrop_dl/crawlers/sendvid.pyindex da1a64068..32a5fd892 100644--- a/cyberdrop_dl/scraper/crawlers/sendvid_crawler.py+++ b/cyberdrop_dl/crawlers/sendvid.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/sex_dot_com_crawler.py b/cyberdrop_dl/crawlers/sex_dot_com.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/sex_dot_com_crawler.pyrename to cyberdrop_dl/crawlers/sex_dot_com.pyindex c491d9dd1..2d8dedae2 100644--- a/cyberdrop_dl/scraper/crawlers/sex_dot_com_crawler.py+++ b/cyberdrop_dl/crawlers/sex_dot_com.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGfrom dateutil import parserfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/spankbang_crawler.py b/cyberdrop_dl/crawlers/spankbang.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/spankbang_crawler.pyrename to cyberdrop_dl/crawlers/spankbang.pyindex dbe7dff69..c505c7341 100644--- a/cyberdrop_dl/scraper/crawlers/spankbang_crawler.py+++ b/cyberdrop_dl/crawlers/spankbang.py@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING, NamedTuplefrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils import javascriptfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.logger import log_debugdiff --git a/cyberdrop_dl/scraper/crawlers/streamable_crawler.py b/cyberdrop_dl/crawlers/streamable.pysimilarity index 97%rename from cyberdrop_dl/scraper/crawlers/streamable_crawler.pyrename to cyberdrop_dl/crawlers/streamable.pyindex 1da28f465..61573747a 100644--- a/cyberdrop_dl/scraper/crawlers/streamable_crawler.py+++ b/cyberdrop_dl/crawlers/streamable.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.logger import log_debugfrom cyberdrop_dl.utils.utilities import error_handling_wrapperdiff --git a/cyberdrop_dl/scraper/crawlers/tiktok_crawler.py b/cyberdrop_dl/crawlers/tiktok.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/tiktok_crawler.pyrename to cyberdrop_dl/crawlers/tiktok.pyindex 58dd9bf15..778c940c5 100644--- a/cyberdrop_dl/scraper/crawlers/tiktok_crawler.py+++ b/cyberdrop_dl/crawlers/tiktok.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom aiolimiter import AsyncLimiterfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/tokyomotion_crawler.py b/cyberdrop_dl/crawlers/tokyomotion.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/tokyomotion_crawler.pyrename to cyberdrop_dl/crawlers/tokyomotion.pyindex 4ca8c3bd9..e87a3146b 100644--- a/cyberdrop_dl/scraper/crawlers/tokyomotion_crawler.py+++ b/cyberdrop_dl/crawlers/tokyomotion.py@@ -9,7 +9,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/toonily_crawler.py b/cyberdrop_dl/crawlers/toonily.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/toonily_crawler.pyrename to cyberdrop_dl/crawlers/toonily.pyindex 3d3630159..4138ce0b9 100644--- a/cyberdrop_dl/scraper/crawlers/toonily_crawler.py+++ b/cyberdrop_dl/crawlers/toonily.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, FILE_HOST_PROFILE, ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/twitter_images_crawler.py b/cyberdrop_dl/crawlers/twitter_images.pysimilarity index 95%rename from cyberdrop_dl/scraper/crawlers/twitter_images_crawler.pyrename to cyberdrop_dl/crawlers/twitter_images.pyindex 3e6cbd07e..465db8393 100644--- a/cyberdrop_dl/scraper/crawlers/twitter_images_crawler.py+++ b/cyberdrop_dl/crawlers/twitter_images.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/wetransfer_crawler.py b/cyberdrop_dl/crawlers/wetransfer.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/wetransfer_crawler.pyrename to cyberdrop_dl/crawlers/wetransfer.pyindex 54d6e192a..dae5145b7 100644--- a/cyberdrop_dl/scraper/crawlers/wetransfer_crawler.py+++ b/cyberdrop_dl/crawlers/wetransfer.py@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING, ClassVarfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:diff --git a/cyberdrop_dl/scraper/crawlers/xbunkr_crawler.py b/cyberdrop_dl/crawlers/xbunkr.pysimilarity index 97%rename from cyberdrop_dl/scraper/crawlers/xbunkr_crawler.pyrename to cyberdrop_dl/crawlers/xbunkr.pyindex 7cb9e0378..8d31e5e71 100644--- a/cyberdrop_dl/scraper/crawlers/xbunkr_crawler.py+++ b/cyberdrop_dl/crawlers/xbunkr.py@@ -5,7 +5,7 @@ from typing import TYPE_CHECKINGfrom yarl import URLfrom cyberdrop_dl.clients.errors import NoExtensionError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.data_enums_classes.url_objects import FILE_HOST_ALBUM, ScrapeItemfrom cyberdrop_dl.utils.logger import logfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/crawlers/xenforo/__init__.py b/cyberdrop_dl/crawlers/xenforo/__init__.pynew file mode 100644index 000000000..7b0f60d57--- /dev/null+++ b/cyberdrop_dl/crawlers/xenforo/__init__.py@@ -0,0 +1,25 @@+from .allporncomix import AllPornComixCrawler+from .bellazon import BellazonCrawler+from .celebforum import CelebForumCrawler+from .f95zone import F95ZoneCrawler+from .leakedmodels import LeakedModelsCrawler+from .nudostar import NudoStarCrawler+from .simpcity import SimpCityCrawler+from .socialmediagirls import SocialMediaGirlsCrawler+from .titsintops import TitsInTopsCrawler+from .xbunker import XBunkerCrawler+from .xenforo import XenforoCrawler++__all__ = [+ "AllPornComixCrawler",+ "BellazonCrawler",+ "CelebForumCrawler",+ "F95ZoneCrawler",+ "LeakedModelsCrawler",+ "NudoStarCrawler",+ "SimpCityCrawler",+ "SocialMediaGirlsCrawler",+ "TitsInTopsCrawler",+ "XBunkerCrawler",+ "XenforoCrawler",+]diff --git a/cyberdrop_dl/scraper/crawlers/allporncomix_crawler.py b/cyberdrop_dl/crawlers/xenforo/allporncomix.pysimilarity index 90%rename from cyberdrop_dl/scraper/crawlers/allporncomix_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/allporncomix.pyindex ef4e5899c..4ef2d3de5 100644--- a/cyberdrop_dl/scraper/crawlers/allporncomix_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/allporncomix.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/bellazon_crawler.py b/cyberdrop_dl/crawlers/xenforo/bellazon.pysimilarity index 93%rename from cyberdrop_dl/scraper/crawlers/bellazon_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/bellazon.pyindex 3ad5ab7b7..9b006712c 100644--- a/cyberdrop_dl/scraper/crawlers/bellazon_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/bellazon.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/celebforum_crawler.py b/cyberdrop_dl/crawlers/xenforo/celebforum.pysimilarity index 91%rename from cyberdrop_dl/scraper/crawlers/celebforum_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/celebforum.pyindex 76c32f748..4ca337f94 100644--- a/cyberdrop_dl/scraper/crawlers/celebforum_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/celebforum.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/f95zone_crawler.py b/cyberdrop_dl/crawlers/xenforo/f95zone.pysimilarity index 94%rename from cyberdrop_dl/scraper/crawlers/f95zone_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/f95zone.pyindex 12c07ea8c..2d4e42f61 100644--- a/cyberdrop_dl/scraper/crawlers/f95zone_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/f95zone.py@@ -6,7 +6,7 @@ from yarl import URLfrom cyberdrop_dl.utils.utilities import error_handling_wrapper-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/leakedmodels_crawler.py b/cyberdrop_dl/crawlers/xenforo/leakedmodels.pysimilarity index 86%rename from cyberdrop_dl/scraper/crawlers/leakedmodels_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/leakedmodels.pyindex 00bc5d126..e34d0d8b9 100644--- a/cyberdrop_dl/scraper/crawlers/leakedmodels_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/leakedmodels.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/nudostar_crawler.py b/cyberdrop_dl/crawlers/xenforo/nudostar.pysimilarity index 87%rename from cyberdrop_dl/scraper/crawlers/nudostar_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/nudostar.pyindex ed832d004..3ebf03023 100644--- a/cyberdrop_dl/scraper/crawlers/nudostar_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/nudostar.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py b/cyberdrop_dl/crawlers/xenforo/simpcity.pysimilarity index 91%rename from cyberdrop_dl/scraper/crawlers/simpcity_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/simpcity.pyindex e397733df..fe9f68aa0 100644--- a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/simpcity.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import XenforoCrawler+from .xenforo import XenforoCrawlerif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/socialmediagirls_crawler.py b/cyberdrop_dl/crawlers/xenforo/socialmediagirls.pysimilarity index 88%rename from cyberdrop_dl/scraper/crawlers/socialmediagirls_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/socialmediagirls.pyindex 2b5f14b1e..a2d56708a 100644--- a/cyberdrop_dl/scraper/crawlers/socialmediagirls_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/socialmediagirls.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/titsintops_crawler.py b/cyberdrop_dl/crawlers/xenforo/titsintops.pysimilarity index 94%rename from cyberdrop_dl/scraper/crawlers/titsintops_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/titsintops.pyindex b8ee71f5a..fa38e9264 100644--- a/cyberdrop_dl/scraper/crawlers/titsintops_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/titsintops.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from bs4 import Tagdiff --git a/cyberdrop_dl/scraper/crawlers/xbunker_crawler.py b/cyberdrop_dl/crawlers/xenforo/xbunker.pysimilarity index 89%rename from cyberdrop_dl/scraper/crawlers/xbunker_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/xbunker.pyindex 1c580049d..0ab1b885c 100644--- a/cyberdrop_dl/scraper/crawlers/xbunker_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/xbunker.py@@ -4,7 +4,7 @@ from typing import TYPE_CHECKINGfrom yarl import URL-from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors+from .xenforo import PostSelectors, Selector, XenforoCrawler, XenforoSelectorsif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Managerdiff --git a/cyberdrop_dl/scraper/crawlers/xenforo_crawler.py b/cyberdrop_dl/crawlers/xenforo/xenforo.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/xenforo_crawler.pyrename to cyberdrop_dl/crawlers/xenforo/xenforo.pyindex 77de927ef..1fc38380a 100644--- a/cyberdrop_dl/scraper/crawlers/xenforo_crawler.py+++ b/cyberdrop_dl/crawlers/xenforo/xenforo.py@@ -13,7 +13,7 @@ from bs4 import BeautifulSoupfrom yarl import URLfrom cyberdrop_dl.clients.errors import InvalidURLError, LoginError, ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id, remove_trailing_slash+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_id, remove_trailing_slashfrom cyberdrop_dl.scraper.filters import set_return_valuefrom cyberdrop_dl.utils.data_enums_classes.url_objects import FORUM, FORUM_POST, ScrapeItemfrom cyberdrop_dl.utils.logger import log, log_debugdiff --git a/cyberdrop_dl/scraper/crawlers/xxxbunker_crawler.py b/cyberdrop_dl/crawlers/xxxbunker.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/xxxbunker_crawler.pyrename to cyberdrop_dl/crawlers/xxxbunker.pyindex 50dda74e3..20e71d77d 100644--- a/cyberdrop_dl/scraper/crawlers/xxxbunker_crawler.py+++ b/cyberdrop_dl/crawlers/xxxbunker.py@@ -11,7 +11,7 @@ from bs4 import BeautifulSoupfrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils.logger import logfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extdiff --git a/cyberdrop_dl/scraper/crawlers/yandex_disk_crawler.py b/cyberdrop_dl/crawlers/yandex_disk.pysimilarity index 99%rename from cyberdrop_dl/scraper/crawlers/yandex_disk_crawler.pyrename to cyberdrop_dl/crawlers/yandex_disk.pyindex 3a819681c..35ca0cbf8 100644--- a/cyberdrop_dl/scraper/crawlers/yandex_disk_crawler.py+++ b/cyberdrop_dl/crawlers/yandex_disk.py@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING, Any, Literal, Selffrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils import javascriptfrom cyberdrop_dl.utils.logger import log_debugfrom cyberdrop_dl.utils.utilities import error_handling_wrapperdiff --git a/cyberdrop_dl/scraper/crawlers/youjizz_crawler.py b/cyberdrop_dl/crawlers/youjizz.pysimilarity index 98%rename from cyberdrop_dl/scraper/crawlers/youjizz_crawler.pyrename to cyberdrop_dl/crawlers/youjizz.pyindex 2b9a6aefc..9cad2d937 100644--- a/cyberdrop_dl/scraper/crawlers/youjizz_crawler.py+++ b/cyberdrop_dl/crawlers/youjizz.py@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING, NamedTuplefrom yarl import URLfrom cyberdrop_dl.clients.errors import ScrapeError-from cyberdrop_dl.scraper.crawler import Crawler, create_task_id+from cyberdrop_dl.crawlers.crawler import Crawler, create_task_idfrom cyberdrop_dl.utils import javascriptfrom cyberdrop_dl.utils.logger import log_debugfrom cyberdrop_dl.utils.utilities import error_handling_wrapperdiff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.pyindex 4c7e62b5f..b0f4453f7 100644--- a/cyberdrop_dl/main.py+++ b/cyberdrop_dl/main.py@@ -18,7 +18,7 @@ from rich.logging import RichHandlerfrom cyberdrop_dl import envfrom cyberdrop_dl.clients.errors import InvalidYamlErrorfrom cyberdrop_dl.managers.manager import Manager-from cyberdrop_dl.scraper.scraper import ScrapeMapper+from cyberdrop_dl.scraper.scrape_mapper import ScrapeMapperfrom cyberdrop_dl.ui.program_ui import ProgramUIfrom cyberdrop_dl.utils import constantsfrom cyberdrop_dl.utils.apprise import send_apprise_notificationsdiff --git a/cyberdrop_dl/managers/client_manager.py b/cyberdrop_dl/managers/client_manager.pyindex cf4613dc9..bae6623bc 100644--- a/cyberdrop_dl/managers/client_manager.py+++ b/cyberdrop_dl/managers/client_manager.py@@ -25,7 +25,7 @@ from cyberdrop_dl.utils.logger import log, log_spacerif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Manager- from cyberdrop_dl.scraper.crawler import ScrapeItem+ from cyberdrop_dl.utils.data_enums_classes.url_objects import ScrapeItemDOWNLOAD_ERROR_ETAGS = {"d835884373f4d6c8f24742ceabe74946": "Imgur image has been removed",diff --git a/cyberdrop_dl/managers/manager.py b/cyberdrop_dl/managers/manager.pyindex 013d7deb9..08f846546 100644--- a/cyberdrop_dl/managers/manager.py+++ b/cyberdrop_dl/managers/manager.py@@ -27,7 +27,7 @@ from cyberdrop_dl.utils.transfer import transfer_v5_db_to_v6if TYPE_CHECKING:from asyncio import TaskGroup- from cyberdrop_dl.scraper.scraper import ScrapeMapper+ from cyberdrop_dl.scraper.scrape_mapper import ScrapeMapperclass Manager:diff --git a/cyberdrop_dl/scraper/__init__.py b/cyberdrop_dl/scraper/__init__.pyindex 01347ba58..e69de29bb 100644--- a/cyberdrop_dl/scraper/__init__.py+++ b/cyberdrop_dl/scraper/__init__.py@@ -1,90 +0,0 @@-# ruff: noqa: F401-from __future__ import annotations--from typing import TYPE_CHECKING--from cyberdrop_dl import env-from cyberdrop_dl.scraper.crawlers.allporncomix_crawler import AllPornComixCrawler-from cyberdrop_dl.scraper.crawlers.bellazon_crawler import BellazonCrawler-from cyberdrop_dl.scraper.crawlers.bestprettygirl_crawler import BestPrettyGirlCrawler-from cyberdrop_dl.scraper.crawlers.bunkrr_albums_io_crawler import BunkrAlbumsIOCrawler-from cyberdrop_dl.scraper.crawlers.bunkrr_crawler import BunkrrCrawler-from cyberdrop_dl.scraper.crawlers.catbox_crawler import CatboxCrawler-from cyberdrop_dl.scraper.crawlers.celebforum_crawler import CelebForumCrawler-from cyberdrop_dl.scraper.crawlers.chevereto_crawler import CheveretoCrawler-from cyberdrop_dl.scraper.crawlers.coomer_crawler import CoomerCrawler-from cyberdrop_dl.scraper.crawlers.cyberdrop_crawler import CyberdropCrawler-from cyberdrop_dl.scraper.crawlers.cyberfile_crawler import CyberfileCrawler-from cyberdrop_dl.scraper.crawlers.dirtyship_crawler import DirtyShipCrawler-from cyberdrop_dl.scraper.crawlers.doodstream_crawler import DoodStreamCrawler-from cyberdrop_dl.scraper.crawlers.dropbox_crawler import DropboxCrawler-from cyberdrop_dl.scraper.crawlers.e621_crawler import E621Crawler-from cyberdrop_dl.scraper.crawlers.ehentai_crawler import EHentaiCrawler-from cyberdrop_dl.scraper.crawlers.eightmuses_crawler import EightMusesCrawler-from cyberdrop_dl.scraper.crawlers.eporner_crawler import EpornerCrawler-from cyberdrop_dl.scraper.crawlers.erome_crawler import EromeCrawler-from cyberdrop_dl.scraper.crawlers.f95zone_crawler import F95ZoneCrawler-from cyberdrop_dl.scraper.crawlers.fapello_crawler import FapelloCrawler-from cyberdrop_dl.scraper.crawlers.fileditch_crawler import FileditchCrawler-from cyberdrop_dl.scraper.crawlers.generic_crawler import GenericCrawler-from cyberdrop_dl.scraper.crawlers.gofile_crawler import GoFileCrawler-from cyberdrop_dl.scraper.crawlers.google_drive_crawler import GoogleDriveCrawler-from cyberdrop_dl.scraper.crawlers.hotpic_crawler import HotPicCrawler-from cyberdrop_dl.scraper.crawlers.imagebam_crawler import ImageBamCrawler-from cyberdrop_dl.scraper.crawlers.imgbb_crawler import ImgBBCrawler-from cyberdrop_dl.scraper.crawlers.imgbox_crawler import ImgBoxCrawler-from cyberdrop_dl.scraper.crawlers.imgur_crawler import ImgurCrawler-from cyberdrop_dl.scraper.crawlers.kemono_crawler import KemonoCrawler-from cyberdrop_dl.scraper.crawlers.leakedmodels_crawler import LeakedModelsCrawler-from cyberdrop_dl.scraper.crawlers.luscious_crawler import LusciousCrawler-from cyberdrop_dl.scraper.crawlers.mediafire_crawler import MediaFireCrawler-from cyberdrop_dl.scraper.crawlers.motherless_crawler import MotherlessCrawler-from cyberdrop_dl.scraper.crawlers.nekohouse_crawler import NekohouseCrawler-from cyberdrop_dl.scraper.crawlers.nhentai_crawler import NHentaiCrawler-from cyberdrop_dl.scraper.crawlers.nudostar_crawler import NudoStarCrawler-from cyberdrop_dl.scraper.crawlers.nudostartv_crawler import NudoStarTVCrawler-from cyberdrop_dl.scraper.crawlers.omegascans_crawler import OmegaScansCrawler-from cyberdrop_dl.scraper.crawlers.onedrive_crawler import OneDriveCrawler-from cyberdrop_dl.scraper.crawlers.pimpandhost_crawler import PimpAndHostCrawler-from cyberdrop_dl.scraper.crawlers.pixeldrain_crawler import PixelDrainCrawler-from cyberdrop_dl.scraper.crawlers.pixhost_crawler import PixHostCrawler-from cyberdrop_dl.scraper.crawlers.pmvhaven_crawler import PMVHavenCrawler-from cyberdrop_dl.scraper.crawlers.pornpics_crawler import PornPicsCrawler-from cyberdrop_dl.scraper.crawlers.postimg_crawler import PostImgCrawler-from cyberdrop_dl.scraper.crawlers.realbooru_crawler import RealBooruCrawler-from cyberdrop_dl.scraper.crawlers.reddit_crawler import RedditCrawler-from cyberdrop_dl.scraper.crawlers.redgifs_crawler import RedGifsCrawler-from cyberdrop_dl.scraper.crawlers.rule34vault_crawler import Rule34VaultCrawler-from cyberdrop_dl.scraper.crawlers.rule34video_crawler import Rule34VideoCrawler-from cyberdrop_dl.scraper.crawlers.rule34xxx_crawler import Rule34XXXCrawler-from cyberdrop_dl.scraper.crawlers.rule34xyz_crawler import Rule34XYZCrawler-from cyberdrop_dl.scraper.crawlers.saint_crawler import SaintCrawler-from cyberdrop_dl.scraper.crawlers.scrolller_crawler import ScrolllerCrawler-from cyberdrop_dl.scraper.crawlers.send_now_crawler import SendNowCrawler-from cyberdrop_dl.scraper.crawlers.sendvid_crawler import SendVidCrawler-from cyberdrop_dl.scraper.crawlers.sex_dot_com_crawler import SexDotComCrawler-from cyberdrop_dl.scraper.crawlers.simpcity_crawler import SimpCityCrawler-from cyberdrop_dl.scraper.crawlers.socialmediagirls_crawler import SocialMediaGirlsCrawler-from cyberdrop_dl.scraper.crawlers.spankbang_crawler import SpankBangCrawler-from cyberdrop_dl.scraper.crawlers.streamable_crawler import StreamableCrawler-from cyberdrop_dl.scraper.crawlers.tiktok_crawler import TikTokCrawler-from cyberdrop_dl.scraper.crawlers.titsintops_crawler import TitsInTopsCrawler-from cyberdrop_dl.scraper.crawlers.tokyomotion_crawler import TokioMotionCrawler-from cyberdrop_dl.scraper.crawlers.toonily_crawler import ToonilyCrawler-from cyberdrop_dl.scraper.crawlers.twitter_images_crawler import TwimgCrawler-from cyberdrop_dl.scraper.crawlers.wetransfer_crawler import WeTransferCrawler-from cyberdrop_dl.scraper.crawlers.xbunker_crawler import XBunkerCrawler-from cyberdrop_dl.scraper.crawlers.xbunkr_crawler import XBunkrCrawler-from cyberdrop_dl.scraper.crawlers.xxxbunker_crawler import XXXBunkerCrawler-from cyberdrop_dl.scraper.crawlers.yandex_disk_crawler import YandexDiskCrawler-from cyberdrop_dl.scraper.crawlers.youjizz_crawler import YouJizzCrawler--if TYPE_CHECKING:- from cyberdrop_dl.scraper.crawler import Crawler--ALL_CRAWLERS: set[type[Crawler]] = {crawler for name, crawler in globals().items() if name.endswith("Crawler")}-DEBUG_CRAWLERS = {SimpCityCrawler, BunkrAlbumsIOCrawler}-CRAWLERS = ALL_CRAWLERS - DEBUG_CRAWLERS--if env.ENABLE_DEBUG_CRAWLERS == "d396ab8c85fcb1fecd22c8d9b58acf944a44e6d35014e9dd39e42c9a64091eda":- CRAWLERS.update(DEBUG_CRAWLERS)diff --git a/cyberdrop_dl/scraper/crawlers/__init__.py b/cyberdrop_dl/scraper/crawlers/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/cyberdrop_dl/scraper/scraper.py b/cyberdrop_dl/scraper/scrape_mapper.pysimilarity index 98%rename from cyberdrop_dl/scraper/scraper.pyrename to cyberdrop_dl/scraper/scrape_mapper.pyindex cb1abb22c..35359b546 100644--- a/cyberdrop_dl/scraper/scraper.py+++ b/cyberdrop_dl/scraper/scrape_mapper.py@@ -11,8 +11,8 @@ import arrowfrom yarl import URLfrom cyberdrop_dl.clients.errors import JDownloaderError, NoExtensionError+from cyberdrop_dl.crawlers import CRAWLERSfrom cyberdrop_dl.downloader.downloader import Downloader-from cyberdrop_dl.scraper import CRAWLERSfrom cyberdrop_dl.scraper.filters import (has_valid_extension,is_in_domain_list,@@ -29,8 +29,8 @@ from cyberdrop_dl.utils.utilities import get_download_path, get_filename_and_extif TYPE_CHECKING:from collections.abc import AsyncGenerator, Sequence+ from cyberdrop_dl.crawlers import Crawlerfrom cyberdrop_dl.managers.manager import Manager- from cyberdrop_dl.scraper.crawler import Crawlerclass ScrapeMapper:@@ -79,7 +79,7 @@ class ScrapeMapper:self.manager.real_debrid_manager.startup()if self.manager.real_debrid_manager.enabled:- from cyberdrop_dl.scraper.crawlers.realdebrid_crawler import RealDebridCrawler+ from cyberdrop_dl.crawlers.realdebrid import RealDebridCrawlerself.existing_crawlers["real-debrid"] = RealDebridCrawler(self.manager)await self.existing_crawlers["real-debrid"].startup()diff --git a/cyberdrop_dl/utils/data_enums_classes/supported_domains.py b/cyberdrop_dl/utils/data_enums_classes/supported_domains.pyindex 20b437d7f..e942bd147 100644--- a/cyberdrop_dl/utils/data_enums_classes/supported_domains.py+++ b/cyberdrop_dl/utils/data_enums_classes/supported_domains.py@@ -2,17 +2,17 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING-from cyberdrop_dl.scraper import CRAWLERS-from cyberdrop_dl.scraper.crawlers.xenforo_crawler import XenforoCrawler+from cyberdrop_dl.crawlers import CRAWLERS+from cyberdrop_dl.crawlers.xenforo import XenforoCrawlerif TYPE_CHECKING:- from cyberdrop_dl.scraper.crawler import Crawler+ from cyberdrop_dl.crawlers import Crawlerforum_crawlers = {crawler for crawler in CRAWLERS if issubclass(crawler, XenforoCrawler)}website_crawlers = CRAWLERS - forum_crawlers-def get_supported_sites_from(crawlers: set[type[Crawler]]) -> dict[str, str]:+def get_supported_sites_from(crawlers: set[type[Crawler]] | set[type[XenforoCrawler]]) -> dict[str, str]:support_sites_dict = {}for crawler in crawlers:if not crawler.SUPPORTED_SITES or crawler.primary_base_domain:diff --git a/cyberdrop_dl/utils/database/tables/history_table.py b/cyberdrop_dl/utils/database/tables/history_table.pyindex 5127dfc9a..db394f289 100644--- a/cyberdrop_dl/utils/database/tables/history_table.py+++ b/cyberdrop_dl/utils/database/tables/history_table.py@@ -14,7 +14,7 @@ if TYPE_CHECKING:import aiosqlitefrom yarl import URL- from cyberdrop_dl.scraper.crawler import Crawler+ from cyberdrop_dl.crawlers import Crawlerfrom cyberdrop_dl.utils.data_enums_classes.url_objects import MediaItemdiff --git a/cyberdrop_dl/utils/utilities.py b/cyberdrop_dl/utils/utilities.pyindex a32191085..0ca9135f9 100644--- a/cyberdrop_dl/utils/utilities.py+++ b/cyberdrop_dl/utils/utilities.py@@ -31,9 +31,9 @@ if TYPE_CHECKING:from rich.text import Text+ from cyberdrop_dl.crawlers import Crawlerfrom cyberdrop_dl.downloader.downloader import Downloaderfrom cyberdrop_dl.managers.manager import Manager- from cyberdrop_dl.scraper.crawler import Crawlerfrom cyberdrop_dl.utils.data_enums_classes.url_objects import MediaItem, ScrapeItem