Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
Ruff fixes
Jacobdbabb9ae6933
diff --git a/cyberdrop_dl/clients/scraper_client.py b/cyberdrop_dl/clients/scraper_client.pyindex 6cc6f6cae..b6d81e54c 100644--- a/cyberdrop_dl/clients/scraper_client.py+++ b/cyberdrop_dl/clients/scraper_client.py@@ -146,7 +146,9 @@ class ScraperClient:content_type = response.headers.get("Content-Type")assert content_type is not Noneif not any(s in content_type.lower() for s in ("html", "text")):- raise InvalidContentTypeError(message=f"Received {content_type}, was expecting text", origin=origin)+ raise InvalidContentTypeError(+ message=f"Received {content_type}, was expecting text", origin=origin+ )text = await CachedStreamReader(await response.read()).read()if with_response_url:return BeautifulSoup(text, "html.parser"), URL(response.url)@@ -215,7 +217,9 @@ class ScraperClient:content_type = response.headers.get("Content-Type")assert content_type is not Noneif "json" not in content_type.lower():- raise InvalidContentTypeError(message=f"Received {content_type}, was expecting JSON", origin=origin)+ raise InvalidContentTypeError(+ message=f"Received {content_type}, was expecting JSON", origin=origin+ )return await response.json()else:async with client_session.get(diff --git a/cyberdrop_dl/utils/dataclasses/url_objects.py b/cyberdrop_dl/utils/dataclasses/url_objects.pyindex 3b3e8882a..d87d56344 100644--- a/cyberdrop_dl/utils/dataclasses/url_objects.py+++ b/cyberdrop_dl/utils/dataclasses/url_objects.py@@ -1,8 +1,8 @@from __future__ import annotationsfrom dataclasses import field-from typing import TYPE_CHECKINGfrom pathlib import Path+from typing import TYPE_CHECKINGfrom cyberdrop_dl.utils.utilities import sanitize_folder