Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
do a null check on skip and only hosts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Dec 6, 2023
1 parent 8e51663 commit 7942cd8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.0.61"
__version__ = "5.0.62"
18 changes: 10 additions & 8 deletions cyberdrop_dl/scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 7942cd8

Please sign in to comment.