From 7942cd8fa0f158ad44d21bcda1ca781c81c249ff Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Wed, 6 Dec 2023 14:16:53 -0700 Subject: [PATCH] do a null check on skip and only hosts. --- cyberdrop_dl/__init__.py | 2 +- cyberdrop_dl/scraper/scraper.py | 18 ++++++++++-------- pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 023d0ca94..59e9770d9 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.0.61" +__version__ = "5.0.62" diff --git a/cyberdrop_dl/scraper/scraper.py b/cyberdrop_dl/scraper/scraper.py index 40bf871ea..54aa7955c 100644 --- a/cyberdrop_dl/scraper/scraper.py +++ b/cyberdrop_dl/scraper/scraper.py @@ -342,14 +342,16 @@ async def map_urls(self) -> None: continue skip = False - for skip_host in self.manager.config_manager.settings_data['Ignore_Options']['skip_hosts']: - if skip_host in scrape_item.url.host: - skip = True - break - for only_host in self.manager.config_manager.settings_data['Ignore_Options']['only_hosts']: - if only_host not in scrape_item.url.host: - skip = True - break + if self.manager.config_manager.settings_data['Ignore_Options']['skip_hosts']: + for skip_host in self.manager.config_manager.settings_data['Ignore_Options']['skip_hosts']: + if skip_host in scrape_item.url.host: + skip = True + break + if self.manager.config_manager.settings_data['Ignore_Options']['only_hosts']: + for only_host in self.manager.config_manager.settings_data['Ignore_Options']['only_hosts']: + if only_host not in scrape_item.url.host: + skip = True + break if str(scrape_item.url).endswith("/"): if scrape_item.url.query_string: diff --git a/pyproject.toml b/pyproject.toml index 80713992d..5e550a38e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.0.61" +version = "5.0.62" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"