Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix: imagebam crawler
NTFSvolumecb2328138631
diff --git a/cyberdrop_dl/scraper/__init__.py b/cyberdrop_dl/scraper/__init__.pyindex 8bcaa8442..9e13e1dbe 100644--- a/cyberdrop_dl/scraper/__init__.py+++ b/cyberdrop_dl/scraper/__init__.py@@ -20,7 +20,7 @@ from cyberdrop_dl.scraper.crawlers.f95zone_crawler import F95ZoneCrawlerfrom cyberdrop_dl.scraper.crawlers.fapello_crawler import FapelloCrawlerfrom cyberdrop_dl.scraper.crawlers.gofile_crawler import GoFileCrawlerfrom cyberdrop_dl.scraper.crawlers.hotpic_crawler import HotPicCrawler-from cyberdrop_dl.scraper.crawlers.imageban_crawler import ImageBanCrawler+from cyberdrop_dl.scraper.crawlers.imageban_crawler import ImageBamCrawlerfrom cyberdrop_dl.scraper.crawlers.imgbb_crawler import ImgBBCrawlerfrom cyberdrop_dl.scraper.crawlers.imgbox_crawler import ImgBoxCrawlerfrom cyberdrop_dl.scraper.crawlers.imgur_crawler import ImgurCrawlerdiff --git a/cyberdrop_dl/scraper/crawlers/imageban_crawler.py b/cyberdrop_dl/scraper/crawlers/imageban_crawler.pyindex 92df6265c..63fd0d1dd 100644--- a/cyberdrop_dl/scraper/crawlers/imageban_crawler.py+++ b/cyberdrop_dl/scraper/crawlers/imageban_crawler.py@@ -17,14 +17,17 @@ if TYPE_CHECKING:from cyberdrop_dl.managers.manager import Manager-class ImageBanCrawler(Crawler):+class ImageBamCrawler(Crawler):primary_base_domain = URL("https://www.imagebam.com/")def __init__(self, manager: Manager) -> None:- super().__init__(manager, "imageban", "ImageBan")+ super().__init__(manager, "imagebam", "ImageBam")"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""+ async def async_startup(self) -> None:+ self.set_cookies()+@create_task_idasync def fetch(self, scrape_item: ScrapeItem) -> None:"""Determines where to send the scrape item based on the url."""@@ -34,6 +37,8 @@ class ImageBanCrawler(Crawler):await self.compilation(scrape_item)elif "show" in scrape_item.url.parts:await self.image(scrape_item)+ elif "view" in scrape_item.url.parts:+ await self.view(scrape_item)else:await self.handle_direct(scrape_item)@@ -117,6 +122,19 @@ class ImageBanCrawler(Crawler):filename, ext = get_filename_and_ext(scrape_item.url.name)await self.handle_file(scrape_item.url, scrape_item, filename, ext)+ @error_handling_wrapper+ async def view(self, scrape_item: ScrapeItem) -> None:+ async with self.request_limiter:+ soup: BeautifulSoup = await self.client.get_soup(self.domain, scrape_item.url, origin=scrape_item)++ if "Share this gallery" in soup.text:+ return await self.album(scrape_item)+ await self.image(scrape_item)++ def set_cookies(self) -> None:+ """Set cookies to bypass confirmation."""+ self.client.client_manager.cookies.update_cookies({"nsfw_inter": "1"}, self.primary_base_domain)+"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""@staticmethod