Skip to content

Bulk asynchronous downloader for multiple file hosts

fix: raise PasswordProtected with origin

NTFSvolumef162cb15a57d
diff --git a/cyberdrop_dl/scraper/crawlers/cyberfile_crawler.py b/cyberdrop_dl/scraper/crawlers/cyberfile_crawler.py
index 8248fafaf..2418e9e56 100644
--- a/cyberdrop_dl/scraper/crawlers/cyberfile_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/cyberfile_crawler.py
@@ -67,7 +67,7 @@ class CyberfileCrawler(Crawler):
password_data = {"folderPassword": password, "folderId": nodeId, "submitme": 1}
password_response: dict = await self.client.post_data(self.domain, self.api_password_process, data=password_data, origin = scrape_item)
if not password_response.get('success'):
- raise PasswordProtected(scrape_item)
+ raise PasswordProtected(origin = scrape_item)
ajax_dict: dict = await self.client.post_data(self.domain, self.api_files, data=data, origin = scrape_item)
ajax_soup = BeautifulSoup(ajax_dict['html'].replace("\\", ""), 'html.parser')
@@ -152,7 +152,7 @@ class CyberfileCrawler(Crawler):
soup = BeautifulSoup (await self.client.post_data(
self.domain, scrape_item.url, data=password_data, raw=True, origin = scrape_item))
if "File password is invalid" in soup.text:
- raise PasswordProtected(scrape_item)
+ raise PasswordProtected(origin =scrape_item)
script_funcs = soup.select('script')
for script in script_funcs:
@@ -174,7 +174,7 @@ class CyberfileCrawler(Crawler):
ajax_soup = BeautifulSoup(ajax_dict['html'].replace("\\", ""), 'html.parser')
if "albumPasswordModel" in ajax_dict['html']:
- raise PasswordProtected(scrape_item)
+ raise PasswordProtected(origin = scrape_item)
file_menu = ajax_soup.select_one('ul[class="dropdown-menu dropdown-info account-dropdown-resize-menu"] li a')
file_button = ajax_soup.select_one('div[class="btn-group responsiveMobileMargin"] button')
diff --git a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py b/cyberdrop_dl/scraper/crawlers/gofile_crawler.py
index b556ee56d..c04cc50f3 100644
--- a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/gofile_crawler.py
@@ -79,7 +79,7 @@ class GoFileCrawler(Crawler):
if "password" in JSON_Resp:
if JSON_Resp['passwordStatus'] in {'passwordRequired','passwordWrong'} or not password:
- raise PasswordProtected(scrape_item)
+ raise PasswordProtected(origin = scrape_item)
if JSON_Resp["canAccess"] is False:
raise ScrapeFailure(403, "Album is private", origin= scrape_item)