From da18089aa02cd7f065544dce818ce8ece5ad545f Mon Sep 17 00:00:00 2001 From: Silencer5179 <162629865+Silencer5179@users.noreply.github.com> Date: Fri, 8 Mar 2024 04:08:02 +0000 Subject: [PATCH] allows block quotes in URLs file using # as delimiter (#839) --- cyberdrop_dl/scraper/scraper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cyberdrop_dl/scraper/scraper.py b/cyberdrop_dl/scraper/scraper.py index 048831d43..1af9d919e 100644 --- a/cyberdrop_dl/scraper/scraper.py +++ b/cyberdrop_dl/scraper/scraper.py @@ -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))