Skip to content

Bulk asynchronous downloader for multiple file hosts

Fix issue with index out of range for simpcity

Jacobc9f95c796667
diff --git a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py b/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py
index eaaeef58c..84f531201 100644
--- a/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/simpcity_crawler.py
@@ -97,8 +97,8 @@ class SimpCityCrawler(Crawler):
scrape_item.children_limit = self.manager.config_manager.settings_data["Download_Options"][
"maximum_number_of_children"
][scrape_item.type]
- post_sections = (scrape_item.url.parts[3], scrape_item.url.fragment)
- if len(scrape_item.url.parts) > 3 and any("post-" in sec for sec in post_sections):
+
+ if len(scrape_item.url.parts) > 3 and any("post-" in sec for sec in (scrape_item.url.parts[3], scrape_item.url.fragment)):
url_parts = str(scrape_item.url).rsplit("post-", 1)
thread_url = URL(url_parts[0].rstrip("#"))
post_number = int(url_parts[-1].strip("/")) if len(url_parts) == 2 else 0