Skip to content

Bulk asynchronous downloader for multiple file hosts

Integrate support for erome

Jules-WinnfieldXf49c053a536b
diff --git a/README.md b/README.md
index c192bec8d..b7a22934b 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@
| Pixl | Albums: pixl.is/album/... <br> Direct Images: pixl.is/image/... <br> User Profile: pixl.is/#USER# <br> All User Albums: pixl.is/#USER#/albums |
| Bunkr | Albums: bunkr.is/a/... <br> Direct Videos: stream.bunkr.is/v/... <br> Direct Videos: cdn.bunkr.is/... <br> Direct Images: i.bunkr.is/... <br> Also works with Bunkr.to |
| GoFile | Albums: gofile.io/d/... |
+| Erome | Albums: erome.com/a/... |
GoFile Requires Chrome to be installed on the system
diff --git a/main.py b/main.py
index 0703d4ebd..32d1dbb91 100644
--- a/main.py
+++ b/main.py
@@ -21,7 +21,7 @@ logging.basicConfig(level=logging.DEBUG, filename='logs.log',
filemode='w')
warnings.filterwarnings("ignore", category=DeprecationWarning)
-SUPPORTED_URLS = {'cyberdrop.me', 'bunkr.is', "bunkr.to", 'pixl.is', 'putme.ga', 'putmega.com', 'gofile.io', 'jpg.church'}
+SUPPORTED_URLS = {'cyberdrop.me', 'bunkr.is', "bunkr.to", 'pixl.is', 'putme.ga', 'putmega.com', 'gofile.io', 'jpg.church', 'erome.com'}
CPU_COUNT = settings.threads if settings.threads != 0 else multiprocessing.cpu_count()
DOWNLOAD_FOLDER = settings.download_folder
diff --git a/utils/downloaders.py b/utils/downloaders.py
index ca308db53..a8c932dba 100644
--- a/utils/downloaders.py
+++ b/utils/downloaders.py
@@ -159,6 +159,8 @@ class Downloader:
referal = url_object[1]
filename = sanitize(url.split("/")[-1])
+ if "?v=" in url:
+ filename = filename.split('v=')[0]
if (self.folder / self.title / filename).exists():
logger.debug(str(self.folder / self.title / filename) + " Already Exists")
else:
@@ -279,6 +281,7 @@ def get_downloaders(urls: Dict[str, Dict[str, List[str]]], cookies: Iterable[str
'putme.ga': Downloader,
'putmega.com': Downloader,
'jpg.church': Downloader,
+ 'erome.com': Downloader,
'gofile.io': Downloader
}
diff --git a/utils/scrapers.py b/utils/scrapers.py
index 0dd59d09a..3cb257316 100644
--- a/utils/scrapers.py
+++ b/utils/scrapers.py
@@ -156,6 +156,34 @@ class ChibisafeSpider(Spider):
yield {'netloc': netloc, 'url': link, 'title': title, 'referal': response.url, 'cookies': ''}
+class EromeSpider(Spider):
+ name = 'Chibisafe'
+
+ def __init__(self, *args, **kwargs):
+ self.myurls = kwargs.get('myurls', [])
+ super(EromeSpider, self).__init__(*args, **kwargs)
+
+ def start_requests(self):
+ for url in self.myurls:
+ yield Request(url, self.parse)
+
+ def parse(self, response, **kwargs):
+ img_links = response.css('img[class="img-front lasyload"]::attr(data-src)').getall()
+ vid_links = response.css('div[class=media-group] div[class=video-lg] video source::attr(src)').getall()
+ try:
+ title = response.css('div[class="col-sm-12 page-content"] h1::text').get()
+ if title_setting:
+ title = title + " - " + response.url.split('/')[-1]
+ except Exception as e:
+ title = response.url.split('/')[-1]
+ for link in img_links:
+ netloc = urlparse(link).netloc.replace('www.', '')
+ yield {'netloc': netloc, 'url': link, 'title': title, 'referal': response.url, 'cookies': ''}
+ for link in vid_links:
+ netloc = urlparse(link).netloc.replace('www.', '')
+ yield {'netloc': netloc, 'url': link, 'title': title, 'referal': response.url, 'cookies': ''}
+
+
class GoFileSpider(Spider):
name = 'GoFile'
@@ -205,9 +233,11 @@ def sanitize_key(key):
elif "putmega" in key:
key = 'putme.ga'
elif "gofile" in key:
- key = 'gofile.io'
+ key = "gofile.io"
elif "church" in key:
key = "jpg.church"
+ elif "erome" in key:
+ key = "erome.com"
return key
@@ -221,6 +251,7 @@ def check_direct(url):
def scrape(urls):
mapping_ShareX = ["pixl.is", "putme.ga", "putmega.com", "jpg.church"]
mapping_Chibisafe = ["cyberdrop.me", "cyberdrop.cc", "cyberdrop.to", "cyberdrop.nl", "bunkr.is", "bunkr.to"]
+ mapping_Erome = ["erome.com"]
mapping_GoFile = ["gofile.io"]
replacements = [
@@ -237,6 +268,7 @@ def scrape(urls):
ShareX_urls = []
Chibisafe_urls = []
+ Erome_urls = []
GoFile_urls = []
unsupported_urls = []
@@ -258,6 +290,8 @@ def scrape(urls):
result_links.setdefault(base_domain, OrderedDict()).setdefault("Chibisafe Loose Files", []).append([url, url])
else:
Chibisafe_urls.append(url)
+ elif base_domain in mapping_Erome:
+ Erome_urls.append(url)
elif base_domain in mapping_GoFile:
GoFile_urls.append(url)
else:
@@ -279,6 +313,7 @@ def scrape(urls):
if ShareX_urls: process.crawl(ShareX_Spider, myurls=ShareX_urls)
if Chibisafe_urls: process.crawl(ChibisafeSpider, myurls=Chibisafe_urls)
+ if Erome_urls: process.crawl(EromeSpider, myurls=Erome_urls)
if GoFile_urls: process.crawl(GoFileSpider, myurls=GoFile_urls)
process.start()