Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: simplify query selection

NTFSvolume0b79750b0084
diff --git a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py b/cyberdrop_dl/scraper/crawlers/gofile_crawler.py
index 207b99bc4..47d94e260 100644
--- a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/gofile_crawler.py
@@ -4,7 +4,6 @@ import http
import re
from copy import deepcopy
from typing import TYPE_CHECKING
-from urllib.parse import parse_qs
from hashlib import sha256
from aiolimiter import AsyncLimiter
@@ -48,7 +47,7 @@ class GoFileCrawler(Crawler):
async def album(self, scrape_item: ScrapeItem) -> None:
"""Scrapes an album"""
content_id = scrape_item.url.name
- password = parse_qs(scrape_item.url.raw_query_string, keep_blank_values=True).get("password",[""])[0]
+ password = scrape_item.url.query.get("password","")
if password:
password = sha256(password.encode()).hexdigest()
@@ -74,7 +73,6 @@ class GoFileCrawler(Crawler):
JSON_Resp = JSON_Resp['data']
- await log (f"{JSON_Resp}",10)
if "password" in JSON_Resp:
if JSON_Resp['passwordStatus'] in {'passwordRequired','passwordWrong'} or not password:
raise PasswordProtected(scrape_item)