Skip to content

Bulk asynchronous downloader for multiple file hosts

Added two new crawlers for redgifs and gfycat. Added support for new crawlers within the thotsbay spider

cowliquid091fb0664976
diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.py
index 86303b617..83b20681b 100644
--- a/cyberdrop_dl/main.py
+++ b/cyberdrop_dl/main.py
@@ -13,23 +13,42 @@ from .utils.scraper import scrape
def parse_args():
- parser = argparse.ArgumentParser(description="Bulk downloader for multiple file hosts")
- parser.add_argument("-V", "--version", action="version", version="%(prog)s " + VERSION)
- parser.add_argument("-i", "--input-file", type=Path, help="file containing links to download", default="URLs.txt")
- parser.add_argument("-o", "--output-folder", type=Path, help="folder to download files to", default="Downloads")
- parser.add_argument("--log-file", help="log file to write to", default="downloader.log")
- parser.add_argument("--db-file", help="history database file to write to", default="download_history_size_based.sqlite")
- parser.add_argument("--threads", type=int, help="number of threads to use (0 = max)", default=0)
- parser.add_argument("--attempts", type=int, help="number of attempts to download each file", default=10)
- parser.add_argument("--disable-attempt-limit", help="disables the attempt limitation", action="store_true")
- parser.add_argument("--include-id", help="include the ID in the download folder name", action="store_true")
- parser.add_argument("--exclude-videos", help="skip downloading of video files", action="store_true")
- parser.add_argument("--exclude-images", help="skip downloading of image files", action="store_true")
- parser.add_argument("--exclude-audio", help="skip downloading of audio files", action="store_true")
- parser.add_argument("--exclude-other", help="skip downloading of images", action="store_true")
- parser.add_argument("--thotsbay-username", type=str, help="username to login to thotsbay", default=None)
- parser.add_argument("--thotsbay-password", type=str, help="password to login to thotsbay", default=None)
- parser.add_argument("links", metavar="link", nargs="*", help="link to content to download (passing multiple links is supported)", default=[])
+ parser = argparse.ArgumentParser(
+ description="Bulk downloader for multiple file hosts")
+ parser.add_argument("-V", "--version", action="version",
+ version="%(prog)s " + VERSION)
+ parser.add_argument("-i", "--input-file", type=Path,
+ help="file containing links to download", default="URLs.txt")
+ parser.add_argument("-o", "--output-folder", type=Path,
+ help="folder to download files to", default="Downloads")
+ parser.add_argument(
+ "--log-file", help="log file to write to", default="downloader.log")
+ parser.add_argument("--db-file", help="history database file to write to",
+ default="download_history_size_based.sqlite")
+ parser.add_argument("--threads", type=int,
+ help="number of threads to use (0 = max)", default=0)
+ parser.add_argument("--attempts", type=int,
+ help="number of attempts to download each file", default=10)
+ parser.add_argument("--disable-attempt-limit",
+ help="disables the attempt limitation", action="store_true")
+ parser.add_argument(
+ "--include-id", help="include the ID in the download folder name", action="store_true")
+ parser.add_argument(
+ "--exclude-videos", help="skip downloading of video files", action="store_true")
+ parser.add_argument(
+ "--exclude-images", help="skip downloading of image files", action="store_true")
+ parser.add_argument(
+ "--exclude-audio", help="skip downloading of audio files", action="store_true")
+ parser.add_argument("--exclude-other",
+ help="skip downloading of images", action="store_true")
+ parser.add_argument(
+ "--only-gifs", help="Only download embedded gifs from thread", action="store_true")
+ parser.add_argument("--thotsbay-username", type=str,
+ help="username to login to thotsbay", default=None)
+ parser.add_argument("--thotsbay-password", type=str,
+ help="password to login to thotsbay", default=None)
+ parser.add_argument("links", metavar="link", nargs="*",
+ help="link to content to download (passing multiple links is supported)", default=[])
args = parser.parse_args()
return args
@@ -68,7 +87,8 @@ async def download_all(args: argparse.Namespace):
await downloader.download_content()
logger.debug("Finished")
- all_files = [str(f) for f in args.output_folder.glob("**/*") if f.is_file()]
+ all_files = [str(f)
+ for f in args.output_folder.glob("**/*") if f.is_file()]
combined = '\t'.join(all_files)
conn.commit()
@@ -80,8 +100,12 @@ async def download_all(args: argparse.Namespace):
await log('There are still partial downloads in your folders, please re-run the program.')
-def main():
- args = parse_args()
+def main(args=None):
+ if not args:
+ print("parsing args")
+ args = parse_args()
+ else:
+ print(args)
logging.basicConfig(
filename=args.log_file,
level=logging.DEBUG,
diff --git a/cyberdrop_dl/utils/base_functions.py b/cyberdrop_dl/utils/base_functions.py
index 0eb44c619..194ec931b 100644
--- a/cyberdrop_dl/utils/base_functions.py
+++ b/cyberdrop_dl/utils/base_functions.py
@@ -59,7 +59,8 @@ async def sql_initialize(download_history):
async def sql_check_existing(cursor: sqlite3.Cursor, filename, size):
- cursor.execute("""SELECT completed FROM downloads WHERE filename = '%s' and size = %d""" % (filename, size))
+ cursor.execute(
+ """SELECT completed FROM downloads WHERE filename = '%s' and size = %d""" % (filename, size))
sql_file_check = cursor.fetchone()
if sql_file_check:
if sql_file_check[0] == 1:
@@ -68,12 +69,14 @@ async def sql_check_existing(cursor: sqlite3.Cursor, filename, size):
async def sql_insert_file(connection: sqlite3.Connection, cursor: sqlite3.Cursor, filename, size, completed):
- cursor.execute("""INSERT OR IGNORE INTO downloads VALUES ('%s', %d, %d)""" % (filename, size, completed))
+ cursor.execute("""INSERT OR IGNORE INTO downloads VALUES ('%s', %d, %d)""" % (
+ filename, size, completed))
connection.commit()
async def sql_update_file(connection: sqlite3.Connection, cursor: sqlite3.Cursor, filename, size, completed):
- cursor.execute("""INSERT OR REPLACE INTO downloads VALUES ('%s', %d, %d)""" % (filename, size, completed))
+ cursor.execute("""INSERT OR REPLACE INTO downloads VALUES ('%s', %d, %d)""" % (
+ filename, size, completed))
connection.commit()
@@ -96,6 +99,9 @@ async def make_title_safe(title: str):
async def purge_dir(dir, in_place=True):
deleted = []
+
+ # IT DELETES NON-EMPTY DIRS???
+
dir_tree = list(os.walk(dir, topdown=False))
for tree_element in dir_tree:
@@ -111,7 +117,8 @@ async def purge_dir(dir, in_place=True):
async def regex_links(urls) -> list:
- all_links = [x.group().replace(".md.", ".") for x in re.finditer(r"(?:http.*?)(?=('|$|\n|\r\n|\r|\s|\"|\[/URL]))", urls)]
+ all_links = [x.group().replace(".md.", ".") for x in re.finditer(
+ r"(?:http.*?)(?=('|$|\n|\r\n|\r|\s|\"|\[/URL]))", urls)]
yarl_links = []
for link in all_links:
yarl_links.append(URL(link))
@@ -131,7 +138,8 @@ async def bunkr_parse(url: URL) -> URL:
async def cyberdrop_parse(url: URL) -> URL:
- mapping_direct = [r'img-...cyberdrop...', r'f.cyberdrop...', r'fs-...cyberdrop...']
+ mapping_direct = [r'img-...cyberdrop...',
+ r'f.cyberdrop...', r'fs-...cyberdrop...']
url = str(url)
for mapping in mapping_direct:
url = re.sub(mapping, 'cyberdrop.to', url)
@@ -143,7 +151,8 @@ async def pixeldrain_parse(url: URL, title: str) -> URL:
if url.parts[1] == 'l':
final_url = URL('https://pixeldrain.com/api/list/') / title / 'zip'
else:
- final_url = (URL('https://pixeldrain.com/api/file/') / title).with_query('download')
+ final_url = (URL('https://pixeldrain.com/api/file/') /
+ title).with_query('download')
return final_url
diff --git a/cyberdrop_dl/utils/crawlers/Gfycat_Spider.py b/cyberdrop_dl/utils/crawlers/Gfycat_Spider.py
new file mode 100644
index 000000000..803e4abe7
--- /dev/null
+++ b/cyberdrop_dl/utils/crawlers/Gfycat_Spider.py
@@ -0,0 +1,41 @@
+import asyncio
+import re
+
+from bs4 import BeautifulSoup
+from colorama import Fore
+from yarl import URL
+
+from ..base_functions import log, logger, make_title_safe, ssl_context
+from ..data_classes import CascadeItem
+
+
+class GfycatCrawler():
+ def __init__(self, *, scraping_mapper, session):
+ self.scraping_mapper = scraping_mapper
+ self.session = session
+ self.lock = 0
+
+ async def fetch(self, session, url):
+ try:
+ async with session.get(url, ssl=ssl_context) as response:
+ text = await response.text()
+ soup = BeautifulSoup(text, 'html.parser')
+
+ video = soup.select_one("video[class='video media']")
+ video_srcs = video.select("source")
+
+ # Find the biggest video source, usually the host is giant.gyfcat
+ video_link = None
+ for src in video_srcs:
+ link = URL(src.get("src"))
+ if str(link.host).find("giant") != -1:
+ video_link = link
+ if video_link == None:
+ video_link = URL(video_srcs[0].get("src"))
+
+ return video_link
+
+ except Exception as e:
+ logger.debug("Error encountered while handling %s",
+ str(url), exc_info=True)
+ logger.debug(e)
diff --git a/cyberdrop_dl/utils/crawlers/Redgifs_Spider.py b/cyberdrop_dl/utils/crawlers/Redgifs_Spider.py
new file mode 100644
index 000000000..368ee15bc
--- /dev/null
+++ b/cyberdrop_dl/utils/crawlers/Redgifs_Spider.py
@@ -0,0 +1,43 @@
+import asyncio
+import re
+
+from bs4 import BeautifulSoup
+from colorama import Fore
+from yarl import URL
+
+from ..base_functions import log, logger, make_title_safe, ssl_context
+from ..data_classes import CascadeItem
+from ..data_classes import DomainItem
+
+
+class RedGifsCrawler():
+ def __init__(self, *, scraping_mapper, session):
+ self.scraping_mapper = scraping_mapper
+ self.session = session
+ self.lock = 0
+
+ async def fetch(self, session, url):
+ try:
+ async with session.get(url, ssl=ssl_context) as response:
+ text = await response.text()
+ soup = BeautifulSoup(text, 'html.parser')
+
+ video_metas = soup.select("meta[property='og:video']")
+
+ # Find the video that doesn't contain "mobile"
+ video_src = None
+ for video_meta in video_metas:
+ link = video_meta.get("content")
+ if "mobile" not in link:
+ video_src = URL(link)
+
+ # Just get the first one if we didn't find the non-mobile
+ if video_src == None and len(video_metas) != 0:
+ video_src = URL(video_metas[0].get("content"))
+
+ return video_src
+
+ except Exception as e:
+ logger.debug("Error encountered while handling %s",
+ str(url), exc_info=True)
+ logger.debug(e)
diff --git a/cyberdrop_dl/utils/crawlers/Thotsbay_Spider.py b/cyberdrop_dl/utils/crawlers/Thotsbay_Spider.py
index 50aad4e41..fbbc1ebf9 100644
--- a/cyberdrop_dl/utils/crawlers/Thotsbay_Spider.py
+++ b/cyberdrop_dl/utils/crawlers/Thotsbay_Spider.py
@@ -1,4 +1,5 @@
import asyncio
+import re
from bs4 import BeautifulSoup
from colorama import Fore
@@ -63,7 +64,7 @@ class ThotsbayCrawler():
return
await Cascade.append_title(title)
- await log("Finished scrape of " + str(url), Fore.WHITE)
+ # await log("Finished scrape of " + str(url), Fore.WHITE)
return Cascade
async def parse_thread(self, session, url, Cascade, title):
@@ -87,16 +88,24 @@ class ThotsbayCrawler():
content_links = []
post_number = str(url).split("post-")
- post_number = int(post_number[-1].strip("/")) if len(post_number) == 2 else None
+ post_number = int(
+ post_number[-1].strip("/")) if len(post_number) == 2 else None
-
- posts = soup.select("div[class='message-main uix_messageContent js-quickEditTarget']")
+ posts = soup.select(
+ "div[class='message-main uix_messageContent js-quickEditTarget']")
for post in posts:
+ # Find post number
+ post_num_int = post.select_one(
+ "li[class=u-concealed] a")
+ post_num_int = int(post_num_int.get(
+ 'href').split('post-')[-1])
+
+ # Check if current post is before the specified post number in args
if post_number:
- post_num_int = post.select_one("li[class=u-concealed] a")
- post_num_int = int(post_num_int.get('href').split('post-')[-1])
if post_number > post_num_int:
continue
+
+ # Get the post content
for elem in post.find_all('blockquote'):
elem.decompose()
post_content = post.select_one("div[class=bbWrapper]")
@@ -113,7 +122,8 @@ class ThotsbayCrawler():
link = domain / link[1:]
content_links.append(URL(link))
- links = post.select("div[class='bbImageWrapper js-lbImage']")
+ links = post.select(
+ "div[class='bbImageWrapper js-lbImage']")
for link in links:
link = link.get('data-src')
if link.endswith("/"):
@@ -122,7 +132,8 @@ class ThotsbayCrawler():
link = domain / link[1:]
content_links.append(URL(link))
- links = post.select("div[class='bbImageWrapper lazyload js-lbImage']")
+ links = post.select(
+ "div[class='bbImageWrapper lazyload js-lbImage']")
for link in links:
link = link.get('data-src')
if link.endswith("/"):
@@ -144,8 +155,10 @@ class ThotsbayCrawler():
link = domain / link[1:]
content_links.append(URL(link))
- attachments_block = post.select_one("section[class=message-attachments]")
- links = attachments_block.select("a[class='file-preview js-lbImage']") if attachments_block else []
+ attachments_block = post.select_one(
+ "section[class=message-attachments]")
+ links = attachments_block.select(
+ "a[class='file-preview js-lbImage']") if attachments_block else []
for link in links:
link = link.get('href')
if link.endswith("/"):
@@ -154,8 +167,27 @@ class ThotsbayCrawler():
link = domain / link[1:]
await Cascade.add_to_album(url.host, "Attachments", URL(link), url)
- forum_direct_urls = [x for x in content_links if url.host in x.host]
- content_links = [x for x in content_links if x not in forum_direct_urls]
+ # Gyfcat
+ links = post_content.select(
+ "span[data-s9e-mediaembed-iframe]")
+ for link in links:
+ embed_data = link.get("data-s9e-mediaembed-iframe")
+ # Replace gyfcat embed url escape chars
+ embed_data = embed_data.replace("\/\/", "https://www.")
+ embed_data = embed_data.replace("\\", "")
+
+ # extract gyfcat url from embed data
+ embed_url = re.search(
+ "https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)", embed_data)
+ if embed_url:
+ embed_url = URL(embed_url.group(
+ 0).replace("www.", ""))
+ content_links.append(embed_url)
+
+ forum_direct_urls = [
+ x for x in content_links if url.host in x.host]
+ content_links = [
+ x for x in content_links if x not in forum_direct_urls]
for link in forum_direct_urls:
if str(link).endswith("/"):
link = URL(str(link)[:-1])
@@ -169,7 +201,8 @@ class ThotsbayCrawler():
tasks.append(self.scraping_mapper.map_url(link, title))
await asyncio.gather(*tasks)
- next_page = soup.select_one('a[class="pageNav-jump pageNav-jump--next"]')
+ next_page = soup.select_one(
+ 'a[class="pageNav-jump pageNav-jump--next"]')
if next_page is not None:
next_page = next_page.get('href')
if next_page is not None:
@@ -180,5 +213,6 @@ class ThotsbayCrawler():
return title
except Exception as e:
- logger.debug("Error encountered while handling %s", str(url), exc_info=True)
+ logger.debug("Error encountered while handling %s",
+ str(url), exc_info=True)
logger.debug(e)
diff --git a/cyberdrop_dl/utils/data_classes.py b/cyberdrop_dl/utils/data_classes.py
index f7f709149..cea20851e 100644
--- a/cyberdrop_dl/utils/data_classes.py
+++ b/cyberdrop_dl/utils/data_classes.py
@@ -28,7 +28,8 @@ class DomainItem:
if title in self.albums.keys():
await self.albums[title].add_link_pair(link, referral)
else:
- self.albums[title] = AlbumItem(title=title, link_pairs=[(link, referral)])
+ self.albums[title] = AlbumItem(
+ title=title, link_pairs=[(link, referral)])
async def add_album(self, title: str, album: AlbumItem):
if title in self.albums.keys():
@@ -66,7 +67,8 @@ class CascadeItem:
if domain in self.domains.keys():
await self.domains[domain].add_to_album(title, link, referral)
else:
- self.domains[domain] = DomainItem(domain, {title: AlbumItem(title, [(link, referral)])})
+ self.domains[domain] = DomainItem(
+ domain, {title: AlbumItem(title, [(link, referral)])})
async def add_album(self, domain: str, title: str, album: AlbumItem):
if domain in self.domains.keys():
diff --git a/cyberdrop_dl/utils/downloaders.py b/cyberdrop_dl/utils/downloaders.py
index 7989907d3..9add35718 100644
--- a/cyberdrop_dl/utils/downloaders.py
+++ b/cyberdrop_dl/utils/downloaders.py
@@ -63,7 +63,8 @@ async def throttle(self, url: URL) -> None:
remaining = delay - elapsed + 0.25
- log_string = '\nDelaying request to %s for %.2f seconds.' % (host, remaining)
+ log_string = '\nDelaying request to %s for %.2f seconds.' % (
+ host, remaining)
logger.debug(log_string)
await asyncio.sleep(remaining)
@@ -143,7 +144,8 @@ class Downloader:
resume_point = 0
complete_file = (self.folder / self.title / filename)
- temp_file = complete_file.with_suffix(complete_file.suffix + '.part')
+ temp_file = complete_file.with_suffix(
+ complete_file.suffix + '.part')
if temp_file.exists():
resume_point = temp_file.stat().st_size
@@ -152,9 +154,11 @@ class Downloader:
async with session.get(url, headers=headers, ssl=ssl_context, raise_for_status=True) as resp:
content_type = resp.headers.get('Content-Type')
if 'text' in content_type.lower() or 'html' in content_type.lower():
- logger.debug(f"Server for %s is either down or the file no longer exists" % str(url))
+ logger.debug(
+ f"Server for %s is either down or the file no longer exists" % str(url))
return
- total = int(resp.headers.get('Content-Length', str(0))) + resume_point
+ total = int(resp.headers.get(
+ 'Content-Length', str(0))) + resume_point
if await sql_check_existing(self.cursor, filename, total):
logger.debug("%s Already Downloaded" % filename)
@@ -178,7 +182,8 @@ class Downloader:
aiohttp.client_exceptions.ClientResponseError, FailureException) as e:
try:
if 400 <= e.code < 500:
- logger.debug("We ran into a 400 level error: %s" % str(e.code))
+ logger.debug(
+ "We ran into a 400 level error: %s" % str(e.code))
return
resp.close()
except:
@@ -190,7 +195,8 @@ class Downloader:
complete_file = (self.folder / self.title / filename)
temp_file = complete_file.with_suffix(complete_file.suffix + '.part')
if complete_file.exists():
- logger.debug(str(self.folder / self.title / filename) + " Already Exists")
+ logger.debug(str(self.folder / self.title /
+ filename) + " Already Exists")
await aiofiles.os.remove(temp_file)
else:
temp_file.rename(complete_file)
@@ -248,7 +254,7 @@ class Downloader:
def get_downloaders(Cascade: CascadeItem, folder: Path, attempts: int, disable_attempt_limit: bool, threads: int, exclude_videos: bool,
- exclude_images: bool, exclude_audio: bool, exclude_other: bool, connection:sqlite3.Connection, cursor: sqlite3.Cursor) -> List[Downloader]:
+ exclude_images: bool, exclude_audio: bool, exclude_other: bool, connection: sqlite3.Connection, cursor: sqlite3.Cursor) -> List[Downloader]:
"""Get a list of downloaders for each supported type of URLs.
We shouldn't just assume that each URL will have the same netloc as
the first one, so we need to classify them one by one, sort them to
diff --git a/cyberdrop_dl/utils/scraper_helper.py b/cyberdrop_dl/utils/scraper_helper.py
index f8ac4551d..20b6c1edb 100644
--- a/cyberdrop_dl/utils/scraper_helper.py
+++ b/cyberdrop_dl/utils/scraper_helper.py
@@ -6,6 +6,8 @@ from .crawlers.Erome_Spider import EromeCrawler
from .crawlers.GoFile_Spider import GofileCrawler
from .crawlers.ShareX_Spider import ShareXCrawler
from .crawlers.Thotsbay_Spider import ThotsbayCrawler
+from .crawlers.Gfycat_Spider import GfycatCrawler
+from .crawlers.Redgifs_Spider import RedGifsCrawler
from .base_functions import log, pixeldrain_parse
from .data_classes import CascadeItem
@@ -23,12 +25,14 @@ class ScrapeMapper():
self.gofile_crawler = None
self.anonfiles_crawler = None
self.thotsbay_crawler = None
+ self.gfycat_crawler = None
+ self.redgifs_crawler = None
self.mapping = {"pixl.is": self.ShareX, "putme.ga": self.ShareX, "putmega.com": self.ShareX,
"jpg.church": self.ShareX, "cyberdrop.me": self.Chibisafe, "cyberdrop.cc": self.Chibisafe,
"cyberdrop.to": self.Chibisafe, "cyberdrop.nl": self.Chibisafe, "bunkr.is": self.Chibisafe,
"bunkr.to": self.Chibisafe, "erome.com": self.Erome, "gofile.io": self.GoFile,
"anonfiles.com": self.Anonfiles, "pixeldrain.com": self.Pixeldrain,
- "thotsbay.com": self.ThotsBay, "socialmediagirls.com": self.ThotsBay}
+ "thotsbay.com": self.ThotsBay, "socialmediagirls.com": self.ThotsBay, "gfycat.com": self.gfycat, "redgifs.com": self.redgifs}
async def ShareX(self, url: URL, title=None):
if not self.sharex_crawler:
@@ -40,7 +44,8 @@ class ScrapeMapper():
async def Chibisafe(self, url: URL, title=None):
if not self.chibisafe_crawler:
- self.chibisafe_crawler = ChibisafeCrawler(include_id=self.include_id)
+ self.chibisafe_crawler = ChibisafeCrawler(
+ include_id=self.include_id)
domain_obj = await self.chibisafe_crawler.fetch(self.session, url)
if title:
await domain_obj.append_title(title)
@@ -56,7 +61,8 @@ class ScrapeMapper():
async def Anonfiles(self, url: URL, title=None):
if not self.anonfiles_crawler:
- self.anonfiles_crawler = AnonfilesCrawler(include_id=self.include_id)
+ self.anonfiles_crawler = AnonfilesCrawler(
+ include_id=self.include_id)
domain_obj = await self.anonfiles_crawler.fetch(self.session, url)
if title:
await domain_obj.append_title(title)
@@ -77,9 +83,26 @@ class ScrapeMapper():
async def ThotsBay(self, url: URL, title=None):
if not self.thotsbay_crawler:
- self.thotsbay_crawler = ThotsbayCrawler(include_id=self.include_id, username=self.username, password=self.password, scraping_mapper=self, session=self.session)
+ self.thotsbay_crawler = ThotsbayCrawler(
+ include_id=self.include_id, username=self.username, password=self.password, scraping_mapper=self, session=self.session)
await self.Cascade.extend(await self.thotsbay_crawler.fetch(self.session, url))
+ async def gfycat(self, url: URL, title=None):
+ if not self.gfycat_crawler:
+ self.gfycat_crawler = GfycatCrawler(
+ scraping_mapper=self, session=self.session)
+ content_url = await self.gfycat_crawler.fetch(self.session, url)
+ if content_url:
+ await self.Cascade.add_to_album("gfycat.com", f"{title}/gifs", content_url, url)
+
+ async def redgifs(self, url: URL, title=None):
+ if not self.redgifs_crawler:
+ self.redgifs_crawler = RedGifsCrawler(
+ scraping_mapper=self, session=self.session)
+ content_url = await self.redgifs_crawler.fetch(self.session, url)
+ if content_url:
+ await self.Cascade.add_to_album("redgifs.com", f"{title}/gifs", content_url, url)
+
async def map_url(self, url_to_map: URL, title=None):
for key, value in self.mapping.items():
if key in url_to_map.host:
diff --git a/start.py b/start.py
index 668a21471..3f3b50137 100644
--- a/start.py
+++ b/start.py
@@ -1,4 +1,5 @@
from cyberdrop_dl.main import main as main_dl
+from cyberdrop_dl.main import parse_args
import sys
@@ -8,5 +9,6 @@ if __name__ == '__main__':
This file is intended for development usage ONLY.
""")
if input("Keep going? (y/N) ") == "y":
+ args = parse_args()
sys.argv = ['--disable-attempt-limit']
- main_dl()
+ main_dl(args)