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

Commit

Permalink
don't use url file when passing links in cli.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Dec 6, 2023
1 parent cbc6d24 commit 2034994
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 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.64"
__version__ = "5.0.65"
12 changes: 7 additions & 5 deletions cyberdrop_dl/scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,13 @@ async def load_links(self) -> None:
input_file = Path(self.manager.args_manager.input_file)

links = []
async with aiofiles.open(input_file, "r", encoding="utf8") as f:
async for line in f:
assert isinstance(line, str)
links.extend(await self.regex_links(line))
links.extend(self.manager.args_manager.other_links)
if not self.manager.args_manager.other_links:
async with aiofiles.open(input_file, "r", encoding="utf8") as f:
async for line in f:
assert isinstance(line, str)
links.extend(await self.regex_links(line))
else:
links.extend(self.manager.args_manager.other_links)
links = list(filter(None, links))

if not links:
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.64"
version = "5.0.65"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 2034994

Please sign in to comment.