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

Commit

Permalink
allows block quotes in URLs file using # as delimiter (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
Silencer5179 authored Mar 8, 2024
1 parent 481559e commit da18089
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cyberdrop_dl/scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,13 @@ async def load_links(self) -> None:

links = []
if not self.manager.args_manager.other_links:
block_quote = False
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))
block_quote = not block_quote if line == "#\n" else block_quote
if not block_quote:
links.extend(await self.regex_links(line))
else:
links.extend(self.manager.args_manager.other_links)
links = list(filter(None, links))
Expand Down

0 comments on commit da18089

Please sign in to comment.