Skip to content

Bulk asynchronous downloader for multiple file hosts

Update geturls.py

Jules-WinnfieldX3a7b9ed518a7
diff --git a/geturls.py b/geturls.py
index e7139fa33..f6f5683cb 100644
--- a/geturls.py
+++ b/geturls.py
@@ -2,19 +2,25 @@ import requests
import os
from bs4 import BeautifulSoup, SoupStrainer
+
def Extrair_Links(u):
try:
url = u
- page = requests.get(url)
+ page = requests.get(url)
data = page.text
soup = BeautifulSoup(data, features="html5lib")
links = []
- linksP = [] #temp
- for link in soup.find_all(id="file"):
- lis = link.get('href')
- if len(str(lis)) > 30:
- lis = lis.replace('.nl/', '.cc/')
- links.append(lis)
+ if 'cyberdrop' in u.lower():
+ for link in soup.find_all(id="file"):
+ lis = link.get('href')
+ if len(str(lis)) > 30:
+ lis = lis.replace('.nl/', '.cc/')
+ links.append(lis)
+ elif 'dmca.gripe' in u.lower():
+ for link in soup.find_all('a', {'class': 'download-button'}):
+ lis = link.get('href')
+ if len(str(lis)) > 30:
+ links.append(lis)
linksP = list(dict.fromkeys(links))
except Exception as e:
print(e)