Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix: CONTENT_LENGTH check
NTFSvolume80b0cb86755e
diff --git a/cyberdrop_dl/clients/downloads.py b/cyberdrop_dl/clients/downloads.pyindex da7253bbb..bd95fc8ba 100644--- a/cyberdrop_dl/clients/downloads.py+++ b/cyberdrop_dl/clients/downloads.py@@ -410,13 +410,17 @@ def _is_html_or_text(content_type: str) -> bool:def _check_content_length(headers: Mapping[str, str]) -> None:- content_length, content_type = headers[hdrs.CONTENT_LENGTH], headers.get(hdrs.CONTENT_TYPE)- if content_type is None:- return- if content_length == "322509" and content_type == "video/mp4":- raise DownloadError("Bunkr Maintenance", "Bunkr under maintenance")- if content_length == "73003" and content_type == "video/mp4":- raise DownloadError(410) # Placeholder video with text "Video removed" (efukt)+ match headers.get(hdrs.CONTENT_TYPE):+ case "video/mp4":+ match headers.get(hdrs.CONTENT_LENGTH):+ case "322509":+ raise DownloadError("Bunkr Maintenance", "Bunkr under maintenance")+ case "73003":+ raise DownloadError(410) # Placeholder video with text "Video removed" (efukt)+ case _:+ return+ case _:+ returnasync def filter_by_duration(media_item: MediaItem, config: Config) -> bool: