Skip to content

Bulk asynchronous downloader for multiple file hosts

fix postimg direct links

Jules-WinnfieldX5f52c953f6dd
diff --git a/cyberdrop_dl/scraper/crawlers/postimg_crawler.py b/cyberdrop_dl/scraper/crawlers/postimg_crawler.py
index 81f43850e..60665eb2b 100644
--- a/cyberdrop_dl/scraper/crawlers/postimg_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/postimg_crawler.py
@@ -26,11 +26,10 @@ class PostImgCrawler(Crawler):
"""Determines where to send the scrape item based on the url"""
task_id = await self.scraping_progress.add_task(scrape_item.url)
- if scrape_item.url.host == "i.postimg.cc":
+ if "i.postimg.cc" in scrape_item.url.host:
filename, ext = await get_filename_and_ext(scrape_item.url.name)
await self.handle_file(scrape_item.url, scrape_item, filename, ext)
-
- if "gallery" in scrape_item.url.parts:
+ elif "gallery" in scrape_item.url.parts:
await self.album(scrape_item)
else:
await self.image(scrape_item)