Skip to content

Bulk asynchronous downloader for multiple file hosts

fix attachment scraping for forums

Jules-WinnfieldX00457b4a4b67
diff --git a/README.md b/README.md
index 12f877c3c..ff321c44f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# `cyberdrop-dl`
**Bulk downloader for multiple file hosts**
-The latest version of the program is 4.0.16
+The latest version of the program is 4.0.17
Brand new and improved! Cyberdrop-DL now has an updated paint job, fantastic new look. On top of this it also downloads from different domains simultaneously.
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 4597e24ea..669fd7538 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "4.0.16"
+__version__ = "4.0.17"
diff --git a/cyberdrop_dl/crawlers/Xenforo_Spider.py b/cyberdrop_dl/crawlers/Xenforo_Spider.py
index e82285426..c1791423f 100644
--- a/cyberdrop_dl/crawlers/Xenforo_Spider.py
+++ b/cyberdrop_dl/crawlers/Xenforo_Spider.py
@@ -178,6 +178,8 @@ class XenforoCrawler:
async def get_links(self, post_content, selector, attribute, domain, temp_title):
"""Grabs links from the post content based on the given selector and attribute"""
found_links = []
+ if not post_content:
+ return found_links
links = post_content.select(selector)
for link in links:
link = link.get(attribute)
@@ -219,6 +221,7 @@ class XenforoCrawler:
returns external links, adds internal to the cascade"""
forum_direct_urls = [x for x in content_links if x[0].host.replace(".st", ".su") in url.host]
forum_direct_urls.extend([x for x in content_links if url.host in x[0].host.replace(".st", ".su")])
+ forum_direct_urls.extend([x for x in content_links if "smgmedia" in x[0].host])
content_links = [x for x in content_links if x not in forum_direct_urls]
for link_title_bundle in forum_direct_urls:
link = link_title_bundle[0]