Skip to content

Bulk asynchronous downloader for multiple file hosts

Return default thread count to all, increased bunk limiter to 3 and properly set the limiter (wasn't being assigned before)

Mitch Petersencdadc15e1878
diff --git a/downloader.py b/downloader.py
index fc2ff3810..722c3760d 100644
--- a/downloader.py
+++ b/downloader.py
@@ -162,13 +162,13 @@ if __name__ == '__main__':
print(dirName)
dirName = dirName.split("–")[0]
- elif 'putme.ga' or 'pixl' in url.lower():
+ elif 'putme.ga' in url.lower() or 'pixl' in url.lower():
dirName = soup.find("meta", {"property": "og:title"}).attrs['content']
elif 'bunk' in url.lower():
dirName = soup.select('h1.title')[0].text.strip()
# Artificial limit to bypass rate limitting
- cpu_count = cpu_count if cpu_count < 3 else 2
+ cpu_count = cpu_count if cpu_count < 4 else 3
rstr = r"[\/\\\:\*\?\"\<\>\|\.]" # '/ \ : * ? " < > | .'
dirName = re.sub(rstr, "_", dirName)
diff --git a/settings.py b/settings.py
index 181d07579..901265219 100644
--- a/settings.py
+++ b/settings.py
@@ -5,7 +5,7 @@
# file_attempts = 0 (will try infinitely), making it 5 as an example will try to download 5 times and then skip.
# timeout is measured in seconds
-threads = 2
+threads = 0
download_folder = "./Downloads/"
file_attempts = 0
timeout = 30
\ No newline at end of file