From a49d8e1ae79533cb4d92094f68c14ab2f1ac449a Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Mon, 29 Jan 2024 13:53:08 -0700 Subject: [PATCH] Fix SC attachments --- cyberdrop_dl/__init__.py | 2 +- cyberdrop_dl/scraper/crawlers/simpcity_crawler.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 022befa80..716291dbd 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.1.57" \ No newline at end of file +__version__ = "5.1.58" \ No newline at end of file diff --git a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py b/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py index e84dcb7c7..1823e2530 100644 --- a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py @@ -147,7 +147,7 @@ async def links(self, scrape_item: ScrapeItem, post_content: Tag) -> None: links = post_content.select(self.links_selector) for link_obj in links: test_for_img = link_obj.select_one("img") - if test_for_img is not None: + if test_for_img is not None and self.attachment_url_part not in link_obj.get(self.links_attribute): continue link = link_obj.get(self.links_attribute) @@ -205,7 +205,7 @@ async def images(self, scrape_item: ScrapeItem, post_content: Tag) -> None: new_scrape_item = await self.create_scrape_item(scrape_item, link, "") await self.handle_external_links(new_scrape_item) elif self.attachment_url_part in link.parts: - await self.handle_internal_links(link, scrape_item) + continue else: await log(f"Unknown image type: {link}", 30) continue diff --git a/pyproject.toml b/pyproject.toml index 5cef3c2bb..6ddd3d925 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.1.57" +version = "5.1.58" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"