Skip to content

Bulk asynchronous downloader for multiple file hosts

Implement LN and SMG (mostly untested, but seems to be working)

Jules-WinnfieldX2c98ed326599
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 49dfe06a0..b405b0055 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "2.30.9"
+__version__ = "3.01.1"
diff --git a/cyberdrop_dl/base_functions/base_functions.py b/cyberdrop_dl/base_functions/base_functions.py
index e534cb18a..2839718a8 100644
--- a/cyberdrop_dl/base_functions/base_functions.py
+++ b/cyberdrop_dl/base_functions/base_functions.py
@@ -34,7 +34,7 @@ logger = logging.getLogger(__name__)
async def sanitize(name: str) -> str:
- return re.sub(r'[<>:"/\\|?*\']', "", name)
+ return re.sub(r'[<>:"/\\|?*\']', "", name).strip()
async def log(text, style=Fore.WHITE) -> None:
diff --git a/cyberdrop_dl/client/client.py b/cyberdrop_dl/client/client.py
index ebc9965b1..f3621cd36 100644
--- a/cyberdrop_dl/client/client.py
+++ b/cyberdrop_dl/client/client.py
@@ -107,6 +107,14 @@ class DownloadSession:
total_size = int(resp.headers.get('Content-Length', str(0)))
return total_size
+ async def get_content_type(self, url: URL, referer: str, current_throttle: int):
+ headers = {'Referer': referer, 'user-agent': self.client.user_agent}
+ await throttle(self, current_throttle, url.host)
+ async with self.client_session.get(url, headers=headers, ssl=self.client.ssl_context,
+ raise_for_status=True) as resp:
+ content_type = resp.headers.get('Content-Type')
+ return content_type.lower()
+
async def download_file(self, url: URL, referer: str, current_throttle: int, range: str, original_filename: str,
filename: str, temp_file: str, resume_point: int, show_progress: bool,
File_Lock: FileLock, folder: Path, title: str):
diff --git a/cyberdrop_dl/client/downloaders.py b/cyberdrop_dl/client/downloaders.py
index 104b491e7..6f03df980 100644
--- a/cyberdrop_dl/client/downloaders.py
+++ b/cyberdrop_dl/client/downloaders.py
@@ -113,8 +113,18 @@ class Downloader:
if not (ext in FILE_FORMATS['Images'] or ext in FILE_FORMATS['Videos'] or ext in FILE_FORMATS['Audio'] or ext in FILE_FORMATS['Other']):
return
except:
- await log("\nCouldn't get filename for: " + str(url))
- return
+ try:
+ content_type = await session.get_content_type(url, referer, current_throttle)
+ if "image" in content_type:
+ ext_temp = content_type.split('/')[-1]
+ filename = filename + '.' + ext_temp
+ filename = await sanitize(filename)
+ else:
+ await log("Unhandled content_type for checking filename: " + content_type)
+ raise
+ except:
+ await log("\nCouldn't get filename for: " + str(url))
+ return
# Make suffix always lower case
ext = '.' + filename.split('.')[-1].lower()
@@ -272,11 +282,12 @@ async def get_downloaders(Cascade: CascadeItem, folder: Path, attempts: int, dis
downloaders = []
for domain, domain_obj in Cascade.domains.items():
+ max_workers_temp = max_workers
if 'bunkr' in domain or 'pixeldrain' in domain or 'anonfiles' in domain:
- max_workers = 2 if (max_workers > 2) else max_workers
+ max_workers_temp = 2 if (max_workers > 2) else max_workers
for title, album_obj in domain_obj.albums.items():
downloader = Downloader(album_obj, title=title, folder=folder, attempts=attempts,
- disable_attempt_limit=disable_attempt_limit, max_workers=max_workers,
+ disable_attempt_limit=disable_attempt_limit, max_workers=max_workers_temp,
excludes=excludes, SQL_helper=SQL_helper, client=client)
downloaders.append(downloader)
return downloaders
diff --git a/cyberdrop_dl/crawlers/LeakedNudes_Spider.py b/cyberdrop_dl/crawlers/LeakedNudes_Spider.py
new file mode 100644
index 000000000..b36a47fc7
--- /dev/null
+++ b/cyberdrop_dl/crawlers/LeakedNudes_Spider.py
@@ -0,0 +1,207 @@
+import asyncio
+import re
+
+from bs4 import BeautifulSoup
+from yarl import URL
+
+from ..base_functions.base_functions import log, logger, make_title_safe
+from ..base_functions.data_classes import AuthData, CascadeItem
+from ..client.client import Session
+
+
+class LeakedNudesCrawler:
+ def __init__(self, *, include_id=False, auth: AuthData = None, scraping_mapper, separate_posts=False):
+ self.include_id = include_id
+ self.separate_posts = separate_posts
+ self.username, self.password = (auth.username, auth.password) if auth else (None, None)
+ self.scraping_mapper = scraping_mapper
+ self.lock = 0
+
+ async def login(self, session: Session, url: URL):
+ domain = URL("https://" + url.host) / "login"
+ text = await session.get_text(domain)
+ if "You are already logged in" in text:
+ return
+ soup = BeautifulSoup(text, 'html.parser')
+
+ inputs = soup.select('form input')
+ data = {
+ elem['name']: elem['value']
+ for elem in inputs
+ if elem.get('name') and elem.get('value')
+ }
+ data.update({"login": self.username, "password": self.password, "_xfRedirect": str(domain)})
+ return await session.post_data_no_resp(domain/"login", data=data)
+
+ async def fetch(self, session: Session, url: URL):
+ await log("Starting scrape of " + str(url))
+ cascade = CascadeItem({})
+
+ try:
+ if self.username and self.password:
+ while True:
+ if self.lock == 0:
+ self.lock = 1
+ await self.login(session, url)
+ self.lock = 0
+ break
+ await asyncio.sleep(2)
+ else:
+ await log("login wasn't provided, consider using --thotsbay-username and --thotsbay-password")
+ await log("Not being logged in might cause issues.")
+ await self.parse_thread(session, url, cascade, "")
+ except Exception as e:
+ self.lock = 0
+ await log(f"there was an error signing into {url.host}")
+ await log(e)
+ return
+
+ await log("Finished scrape of " + str(url))
+ return cascade
+
+ async def parse_thread(self, session: Session, url: URL, cascade: CascadeItem, title: str):
+ try:
+ soup = await session.get_BS4(url)
+
+ domain = URL("https://" + url.host)
+
+ title_block = soup.select_one("h1[class=p-title-value]")
+ for elem in title_block.find_all("a"):
+ elem.decompose()
+
+ if title:
+ pass
+ else:
+ title = title_block.text
+ if self.include_id:
+ titlep2 = url.name
+ titlep2 = [s for s in titlep2 if "." in s][-1]
+ title = title + " - " + titlep2
+ title = await make_title_safe(title.replace(r"\n", "").strip())
+
+ content_links = []
+
+ post_number = str(url).split("post-")
+ 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']")
+ for post in posts:
+ post_num_str = post.select_one("li[class=u-concealed] a").get('href').split('/')[-1]
+ post_num_int = int(post_num_str.split('post-')[-1])
+ if post_number:
+ if post_number > post_num_int:
+ continue
+
+ temp_title = title+"/"+post_num_str if self.separate_posts else title
+
+ for elem in post.find_all('blockquote'):
+ elem.decompose()
+ post_content = post.select_one("div[class=bbWrapper]")
+
+ # Content links
+ links = post_content.select('a')
+ for link in links:
+ link = link.get('href')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('//'):
+ link = "https:" + link
+ elif link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select("div[class='bbImageWrapper js-lbImage']")
+ for link in links:
+ link = link.get('data-src')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select("div[class='bbImageWrapper lazyload js-lbImage']")
+ for link in links:
+ link = link.get('data-src')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('//'):
+ link = "https:" + link
+ elif link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select("video source")
+ for link in links:
+ link = link.get('src')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('//'):
+ link = "https:" + link
+ elif link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select('iframe[class=saint-iframe]')
+ for link in links:
+ link = link.get('src')
+ content_links.append([URL(link), temp_title])
+
+ 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("/"):
+ link = link[:-1]
+ if link.startswith('/'):
+ link = domain / link[1:]
+ in_prog_title = temp_title + "/Attachments"
+ await cascade.add_to_album(url.host, in_prog_title, URL(link), url)
+
+ links = post_content.select("span[data-s9e-mediaembed-iframe]")
+ for link in links:
+ embed_data = link.get("data-s9e-mediaembed-iframe")
+ embed_data = embed_data.replace("\/\/", "https://www.")
+ embed_data = embed_data.replace("\\", "")
+
+ embed_url = re.search(r"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, temp_title])
+
+ forum_direct_urls = [x for x in content_links if x[0].host in url.host]
+ content_links = [x for x in content_links if x not in forum_direct_urls]
+ for link_title_bundle in forum_direct_urls:
+ link = link_title_bundle[0]
+ temp_title = link_title_bundle[1]
+ in_prog_title = temp_title + "/Attachments"
+ if str(link).endswith("/"):
+ link = URL(str(link)[:-1])
+ if 'attachments' in link.parts:
+ await cascade.add_to_album(url.host, in_prog_title, link, url)
+ if 'content' in link.parts:
+ await cascade.add_to_album(url.host, in_prog_title, link, url)
+ elif 'data' in link.parts:
+ await cascade.add_to_album(url.host, in_prog_title, link, url)
+
+ tasks = []
+ for link_title_bundle in content_links:
+ link = link_title_bundle[0]
+ temp_title = link_title_bundle[1]
+ tasks.append(self.scraping_mapper.map_url(link, temp_title))
+ await asyncio.gather(*tasks)
+
+ 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:
+ if next_page.startswith('/'):
+ next_page = domain / next_page[1:]
+ next_page = URL(next_page)
+ title = await self.parse_thread(session, next_page, cascade, title)
+ return
+
+ except Exception as e:
+ logger.debug("Error encountered while handling %s", str(url), exc_info=True)
+ await log("Error scraping " + str(url))
+ logger.debug(e)
diff --git a/cyberdrop_dl/crawlers/SocialMediaGirls_Spider.py b/cyberdrop_dl/crawlers/SocialMediaGirls_Spider.py
new file mode 100644
index 000000000..519c90754
--- /dev/null
+++ b/cyberdrop_dl/crawlers/SocialMediaGirls_Spider.py
@@ -0,0 +1,207 @@
+import asyncio
+import re
+
+from bs4 import BeautifulSoup
+from yarl import URL
+
+from ..base_functions.base_functions import log, logger, make_title_safe
+from ..base_functions.data_classes import AuthData, CascadeItem
+from ..client.client import Session
+
+
+class SocialMediaGirlsCrawler:
+ def __init__(self, *, include_id=False, auth: AuthData = None, scraping_mapper, separate_posts=False):
+ self.include_id = include_id
+ self.separate_posts = separate_posts
+ self.username, self.password = (auth.username, auth.password) if auth else (None, None)
+ self.scraping_mapper = scraping_mapper
+ self.lock = 0
+
+ async def login(self, session: Session, url: URL):
+ domain = URL("https://" + url.host) / "login"
+ text = await session.get_text(domain)
+ if "You are already logged in" in text:
+ return
+ soup = BeautifulSoup(text, 'html.parser')
+
+ inputs = soup.select('form input')
+ data = {
+ elem['name']: elem['value']
+ for elem in inputs
+ if elem.get('name') and elem.get('value')
+ }
+ data.update({"login": self.username, "password": self.password, "_xfRedirect": str(domain)})
+ return await session.post_data_no_resp(domain/"login", data=data)
+
+ async def fetch(self, session: Session, url: URL):
+ await log("Starting scrape of " + str(url))
+ cascade = CascadeItem({})
+
+ try:
+ if self.username and self.password:
+ while True:
+ if self.lock == 0:
+ self.lock = 1
+ await self.login(session, url)
+ self.lock = 0
+ break
+ await asyncio.sleep(2)
+ else:
+ await log("login wasn't provided, consider using --socialmediagirls-username and --socialmediagirls-password")
+ await log("Not being logged in might cause issues.")
+ await self.parse_thread(session, url, cascade, "")
+ except Exception as e:
+ self.lock = 0
+ await log(f"there was an error signing into {url.host}")
+ await log(e)
+ return
+
+ await log("Finished scrape of " + str(url))
+ return cascade
+
+ async def parse_thread(self, session: Session, url: URL, cascade: CascadeItem, title: str):
+ try:
+ soup = await session.get_BS4(url)
+
+ domain = URL("https://" + url.host)
+
+ title_block = soup.select_one("h1[class=p-title-value]")
+ for elem in title_block.find_all("a"):
+ elem.decompose()
+
+ if title:
+ pass
+ else:
+ title = title_block.text
+ if self.include_id:
+ titlep2 = url.name
+ titlep2 = [s for s in titlep2 if "." in s][-1]
+ title = title + " - " + titlep2
+ title = await make_title_safe(title.replace(r"\n", "").strip())
+
+ content_links = []
+
+ post_number = str(url).split("post-")
+ 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']")
+ for post in posts:
+ post_num_str = post.select_one("li[class=u-concealed] a").get('href').split('/')[-1]
+ post_num_int = int(post_num_str.split('post-')[-1])
+ if post_number:
+ if post_number > post_num_int:
+ continue
+
+ temp_title = title+"/"+post_num_str if self.separate_posts else title
+
+ for elem in post.find_all('blockquote'):
+ elem.decompose()
+ post_content = post.select_one("div[class=bbWrapper]")
+
+ # Content links
+ links = post_content.select('a')
+ for link in links:
+ link = link.get('href')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('//'):
+ link = "https:" + link
+ elif link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select("div[class='bbImageWrapper js-lbImage']")
+ for link in links:
+ link = link.get('data-src')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select("div[class='bbImageWrapper lazyload js-lbImage']")
+ for link in links:
+ link = link.get('data-src')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('//'):
+ link = "https:" + link
+ elif link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select("video source")
+ for link in links:
+ link = link.get('src')
+ if link.endswith("/"):
+ link = link[:-1]
+ if link.startswith('//'):
+ link = "https:" + link
+ elif link.startswith('/'):
+ link = domain / link[1:]
+ content_links.append([URL(link), temp_title])
+
+ links = post.select('iframe[class=saint-iframe]')
+ for link in links:
+ link = link.get('src')
+ content_links.append([URL(link), temp_title])
+
+ 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("/"):
+ link = link[:-1]
+ if link.startswith('/'):
+ link = domain / link[1:]
+ in_prog_title = temp_title + "/Attachments"
+ await cascade.add_to_album(url.host, in_prog_title, URL(link), url)
+
+ links = post_content.select("span[data-s9e-mediaembed-iframe]")
+ for link in links:
+ embed_data = link.get("data-s9e-mediaembed-iframe")
+ embed_data = embed_data.replace("\/\/", "https://www.")
+ embed_data = embed_data.replace("\\", "")
+
+ embed_url = re.search(r"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, temp_title])
+
+ forum_direct_urls = [x for x in content_links if x[0].host in url.host]
+ content_links = [x for x in content_links if x not in forum_direct_urls]
+ for link_title_bundle in forum_direct_urls:
+ link = link_title_bundle[0]
+ temp_title = link_title_bundle[1]
+ in_prog_title = temp_title + "/Attachments"
+ if str(link).endswith("/"):
+ link = URL(str(link)[:-1])
+ if 'attachments' in link.parts:
+ await cascade.add_to_album(url.host, in_prog_title, link, url)
+ if 'content' in link.parts:
+ await cascade.add_to_album(url.host, in_prog_title, link, url)
+ elif 'data' in link.parts:
+ await cascade.add_to_album(url.host, in_prog_title, link, url)
+
+ tasks = []
+ for link_title_bundle in content_links:
+ link = link_title_bundle[0]
+ temp_title = link_title_bundle[1]
+ tasks.append(self.scraping_mapper.map_url(link, temp_title))
+ await asyncio.gather(*tasks)
+
+ 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:
+ if next_page.startswith('/'):
+ next_page = domain / next_page[1:]
+ next_page = URL(next_page)
+ title = await self.parse_thread(session, next_page, cascade, title)
+ return
+
+ except Exception as e:
+ logger.debug("Error encountered while handling %s", str(url), exc_info=True)
+ await log("Error scraping " + str(url))
+ logger.debug(e)
diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.py
index ed36aeed9..29be353f0 100644
--- a/cyberdrop_dl/main.py
+++ b/cyberdrop_dl/main.py
@@ -35,6 +35,10 @@ def parse_args():
parser.add_argument("--exclude-other", help="skip downloading of images", action="store_true")
parser.add_argument("--ignore-history", help="This ignores previous download history", action="store_true")
parser.add_argument("--separate-posts", help="Separates thotsbay scraping into folders by post number", action="store_true")
+ parser.add_argument("--leakednudes-username", type=str, help="username to login to leakednudes", default=None)
+ parser.add_argument("--leakednudes-password", type=str, help="password to login to leakednudes", default=None)
+ parser.add_argument("--socialmediagirls-username", type=str, help="username to login to socialmediagirls", default=None)
+ parser.add_argument("--socialmediagirls-password", type=str, help="password to login to socialmediagirls", default=None)
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("--skip", dest="skip_hosts", choices=SkipData.supported_hosts, help="This removes host links from downloads", action="append", default=[])
@@ -69,13 +73,14 @@ async def download_all(args: argparse.Namespace):
with open(input_file, "r", encoding="utf8") as f:
links += await regex_links(f.read())
+ leakednudes_auth = AuthData(args.leakednudes_username, args.leakednudes_password)
+ socialmediagirls_auth = AuthData(args.socialmediagirls_username, args.socialmediagirls_password)
thotsbay_auth = AuthData(args.thotsbay_username, args.thotsbay_password)
skip_data = SkipData(args.skip_hosts)
excludes = {'videos': args.exclude_videos, 'images': args.exclude_images, 'audio': args.exclude_audio,
'other': args.exclude_other}
- content_object = await scrape(links, client, args.include_id, thotsbay_auth, args.separate_posts,
- skip_data, threads)
-
+ content_object = await scrape(links, client, args.include_id, leakednudes_auth, socialmediagirls_auth,
+ thotsbay_auth, args.separate_posts, skip_data)
if await content_object.is_empty():
logging.error('ValueError No links')
diff --git a/cyberdrop_dl/scraper/scraper.py b/cyberdrop_dl/scraper/scraper.py
index e06273815..d3757eba4 100644
--- a/cyberdrop_dl/scraper/scraper.py
+++ b/cyberdrop_dl/scraper/scraper.py
@@ -6,12 +6,13 @@ from ..base_functions.data_classes import AuthData, SkipData
from ..client.client import Client
-async def scrape(urls, client: Client, include_id: bool, thotsbay_auth: AuthData, separate_posts: bool,
- skip_data: SkipData, threads: int):
+async def scrape(urls, client: Client, include_id: bool, leakednudes_auth: AuthData, socialmediagirls_auth: AuthData,
+ thotsbay_auth: AuthData, separate_posts: bool, skip_data: SkipData):
await log("Starting Scrape")
- scraper = ScrapeMapper(client=client, include_id=include_id, thotsbay_auth=thotsbay_auth,
- separate_posts=separate_posts, skip_data=skip_data, threads=threads)
+ scraper = ScrapeMapper(client=client, include_id=include_id, leakednudes_auth=leakednudes_auth,
+ socialmediagirls_auth=socialmediagirls_auth, thotsbay_auth=thotsbay_auth,
+ separate_posts=separate_posts, skip_data=skip_data)
tasks = []
for link in urls:
tasks.append(scraper.map_url(link))
diff --git a/cyberdrop_dl/scraper/scraper_helper.py b/cyberdrop_dl/scraper/scraper_helper.py
index 6c4afe87e..5b5b1c2cf 100644
--- a/cyberdrop_dl/scraper/scraper_helper.py
+++ b/cyberdrop_dl/scraper/scraper_helper.py
@@ -11,6 +11,7 @@ from ..crawlers.Coomer_Spider import CoomerCrawler
from ..crawlers.Cyberdrop_Spider import CyberdropCrawler
from ..crawlers.Cyberfile_Spider import CyberfileCrawler
from ..crawlers.Erome_Spider import EromeCrawler
+from ..crawlers.LeakedNudes_Spider import LeakedNudesCrawler
from ..crawlers.Gfycat_Spider import GfycatCrawler
from ..crawlers.GoFile_Spider import GofileCrawler
from ..crawlers.Kemono_Spider import KemonoCrawler
@@ -18,6 +19,7 @@ from ..crawlers.Pixeldrain_Crawler import PixelDrainCrawler
from ..crawlers.Redgifs_Spider import RedGifsCrawler
from ..crawlers.Saint_Spider import SaintCrawler
from ..crawlers.ShareX_Spider import ShareXCrawler
+from ..crawlers.SocialMediaGirls_Spider import SocialMediaGirlsCrawler
from ..crawlers.Thotsbay_Spider import ThotsbayCrawler
from ..base_functions.base_functions import log
from ..base_functions.data_classes import CascadeItem, SkipData
@@ -25,10 +27,12 @@ from ..client.rate_limiting import AsyncRateLimiter
class ScrapeMapper():
- def __init__(self, *, include_id=False, thotsbay_auth=None, separate_posts=False, skip_data: SkipData,
- client: Client, threads: int):
+ def __init__(self, *, include_id=False, leakednudes_auth=None, socialmediagirls_auth=None, thotsbay_auth=None,
+ separate_posts=False, skip_data: SkipData, client: Client):
self.include_id = include_id
self.separate_posts = separate_posts
+ self.leakednudes_auth = leakednudes_auth
+ self.socialmediagirls_auth = socialmediagirls_auth
self.thotsbay_auth = thotsbay_auth
self.client = client
@@ -44,24 +48,26 @@ class ScrapeMapper():
self.gfycat_crawler = None
self.gofile_crawler = None
self.kemono_crawler = None
+ self.leakednudes_crawler = None
self.pixeldrain_crawler = None
self.redgifs_crawler = None
self.saint_crawler = None
self.sharex_crawler = None
+ self.socialmediagirls_crawler = None
self.thotsbay_crawler = None
self.jpgchurch_limiter = AsyncRateLimiter(19)
self.bunkr_limiter = AsyncRateLimiter(15)
- self.thotsbay_limiter = asyncio.Semaphore(4)
+ self.forum_limiter = asyncio.Semaphore(4)
self.semaphore = asyncio.Semaphore(1)
self.mapping = {"anonfiles.com": self.Anonfiles, "bunkr": self.Bunkr, "coomer.party": self.coomer,
"cyberdrop": self.Cyberdrop, "cyberfile.is": self.cyberfile,
"erome.com": self.Erome, "gfycat.com": self.gfycat,
"gofile.io": self.GoFile, "jpg.church": self.ShareX,
- "kemono.party": self.Kemono, "pixeldrain.com": self.Pixeldrain,
+ "kemono.party": self.Kemono, "leakednudes": self.LeakedNudes, "pixeldrain.com": self.Pixeldrain,
"pixl.is": self.ShareX, "putme.ga": self.ShareX,
"putmega.com": self.ShareX, "redgifs.com": self.redgifs,
- "saint.to": self.Saint, "thotsbay": self.ThotsBay}
+ "saint.to": self.Saint, "socialmediagirls": self.SocialMediaGirls, "thotsbay": self.ThotsBay}
async def Anonfiles(self, url: URL, title=None):
anonfiles_session = Session(self.client)
@@ -149,6 +155,15 @@ class ScrapeMapper():
await self.Cascade.add_albums(domain_obj)
await kemono_session.exit_handler()
+ async def LeakedNudes(self, url: URL, title=None):
+ leakednudes_session = Session(self.client)
+ if not self.leakednudes_crawler:
+ self.leakednudes_crawler = LeakedNudesCrawler(include_id=self.include_id, auth=self.leakednudes_auth,
+ scraping_mapper=self, separate_posts=self.separate_posts)
+ async with self.forum_limiter:
+ await self.Cascade.extend(await self.leakednudes_crawler.fetch(leakednudes_session, url))
+ await leakednudes_session.exit_handler()
+
async def gfycat(self, url: URL, title=None):
gfycat_session = Session(self.client)
if not self.gfycat_crawler:
@@ -208,12 +223,23 @@ class ScrapeMapper():
await self.Cascade.add_albums(domain_obj)
await sharex_session.exit_handler()
+ async def SocialMediaGirls(self, url: URL, title=None):
+ socialmediagirls_session = Session(self.client)
+ if not self.socialmediagirls_crawler:
+ self.socialmediagirls_crawler = SocialMediaGirlsCrawler(include_id=self.include_id,
+ auth=self.socialmediagirls_auth,
+ scraping_mapper=self,
+ separate_posts=self.separate_posts)
+ async with self.forum_limiter:
+ await self.Cascade.extend(await self.socialmediagirls_crawler.fetch(socialmediagirls_session, url))
+ await socialmediagirls_session.exit_handler()
+
async def ThotsBay(self, url: URL, title=None):
thotsbay_session = Session(self.client)
if not self.thotsbay_crawler:
self.thotsbay_crawler = ThotsbayCrawler(include_id=self.include_id, auth=self.thotsbay_auth,
scraping_mapper=self, separate_posts=self.separate_posts)
- async with self.thotsbay_limiter:
+ async with self.forum_limiter:
await self.Cascade.extend(await self.thotsbay_crawler.fetch(thotsbay_session, url))
await thotsbay_session.exit_handler()