Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
Re-enable SimpCity authentication
Jacob44f8e3b42486
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.pyindex d8f0cec7c..1a500ad39 100644--- a/cyberdrop_dl/__init__.py+++ b/cyberdrop_dl/__init__.py@@ -1 +1 @@-__version__ = "5.3.39"+__version__ = "5.3.40"diff --git a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py b/cyberdrop_dl/scraper/crawlers/simpcity_crawler.pyindex a09300176..fe0cc5d11 100644--- a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py+++ b/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py@@ -19,6 +19,8 @@ class SimpCityCrawler(Crawler):def __init__(self, manager: Manager):super().__init__(manager, "simpcity", "SimpCity")self.primary_base_domain = URL("https://simpcity.su")+ self.logged_in = False+ self.login_attempts = 0self.request_limiter = AsyncLimiter(10, 1)self.title_selector = "h1[class=p-title-value]"@@ -52,6 +54,20 @@ class SimpCityCrawler(Crawler):"""Determines where to send the scrape item based on the url"""task_id = await self.scraping_progress.add_task(scrape_item.url)+ if not self.logged_in and self.login_attempts == 0:+ login_url = self.primary_base_domain / "login"+ session_cookie = self.manager.config_manager.authentication_data['Forums']['simpcity_xf_user_cookie']+ username = self.manager.config_manager.authentication_data['Forums']['simpcity_username']+ password = self.manager.config_manager.authentication_data['Forums']['simpcity_password']+ wait_time = 5++ if session_cookie or (username and password):+ self.login_attempts += 1+ await self.forum_login(login_url, session_cookie, username, password, wait_time)++ if not self.logged_in and self.login_attempts == 1:+ await log("SimpCity login failed. Scraping without an account.", 40)+await self.forum(scrape_item)await self.scraping_progress.remove_task(task_id)diff --git a/pyproject.toml b/pyproject.tomlindex 966c08c00..4baa6e042 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "cyberdrop-dl-patched"-version = "5.3.39"+version = "5.3.40"description = "Bulk downloader for multiple file hosts"authors = ["Jules Winnfield <[email protected]>", "Jacob B <[email protected]>"]readme = "README.md"