diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 5a7de31ef..4a6564b0b 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.1.77" \ No newline at end of file +__version__ = "5.1.78" \ No newline at end of file diff --git a/cyberdrop_dl/clients/download_client.py b/cyberdrop_dl/clients/download_client.py index bcde2f68b..5e8d376cb 100644 --- a/cyberdrop_dl/clients/download_client.py +++ b/cyberdrop_dl/clients/download_client.py @@ -101,7 +101,7 @@ async def _download(self, domain: str, manager: Manager, media_item: MediaItem, await self.client_manager.check_http_status(resp, download=True) content_type = resp.headers.get('Content-Type') ext = Path(media_item.filename).suffix.lower() - if any(s in content_type.lower() for s in ('html', 'text')) and ext not in FILE_FORMATS['Text']: + if content_type and any(s in content_type.lower() for s in ('html', 'text')) and ext not in FILE_FORMATS['Text']: raise InvalidContentTypeFailure(message=f"Received {content_type}, was expecting other") if resp.status != HTTPStatus.PARTIAL_CONTENT and file.is_file(): diff --git a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py index febe599be..0448acefa 100644 --- a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py @@ -76,7 +76,7 @@ async def album(self, scrape_item: ScrapeItem) -> None: filename = card_listing.select_one("div[class*=details]").select_one("p").text file_ext = "." + filename.split(".")[-1] if file_ext.lower() not in FILE_FORMATS['Images'] and file_ext.lower() not in FILE_FORMATS['Videos']: - raise Exception() + raise FileNotFoundError() image_obj = file.select_one("img") src = image_obj.get("src") src = src.replace("/thumbs", "") diff --git a/poetry.lock b/poetry.lock index 37584e0c7..92163faf6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -963,13 +963,13 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "python-dateutil" -version = "2.8.2" +version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, + {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, + {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 1e3c601a7..71b5e475f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.1.77" +version = "5.1.78" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"