Skip to content

Bulk asynchronous downloader for multiple file hosts

Finishing attempted fix for Bunkr

Mitch Petersen8d4f3277f9f4
diff --git a/downloader.py b/downloader.py
index b12e32ec5..10633bb53 100644
--- a/downloader.py
+++ b/downloader.py
@@ -167,6 +167,8 @@ if __name__ == '__main__':
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
rstr = r"[\/\\\:\*\?\"\<\>\|\.]" # '/ \ : * ? " < > | .'
dirName = re.sub(rstr, "_", dirName)
diff --git a/settings.py b/settings.py
index 901265219..181d07579 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 = 0
+threads = 2
download_folder = "./Downloads/"
file_attempts = 0
timeout = 30
\ No newline at end of file