Skip to content

Commit

Permalink
feat: add pornpics support
Browse files Browse the repository at this point in the history
  • Loading branch information
NTFSvolume committed Jan 23, 2025
1 parent 6ac36f1 commit 196f07e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions cyberdrop_dl/scraper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from cyberdrop_dl.scraper.crawlers.pimpandhost_crawler import PimpAndHostCrawler
from cyberdrop_dl.scraper.crawlers.pixeldrain_crawler import PixelDrainCrawler
from cyberdrop_dl.scraper.crawlers.pixhost_crawler import PixHostCrawler
from cyberdrop_dl.scraper.crawlers.pornpics_crawler import PornPicCrawler
from cyberdrop_dl.scraper.crawlers.postimg_crawler import PostImgCrawler
from cyberdrop_dl.scraper.crawlers.realbooru_crawler import RealBooruCrawler
from cyberdrop_dl.scraper.crawlers.reddit_crawler import RedditCrawler
Expand Down
36 changes: 36 additions & 0 deletions cyberdrop_dl/scraper/crawlers/pornpics_crawler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from yarl import URL

from cyberdrop_dl.scraper.crawler import Crawler, create_task_id
from cyberdrop_dl.utils.utilities import error_handling_wrapper

if TYPE_CHECKING:
from cyberdrop_dl.managers.manager import Manager
from cyberdrop_dl.utils.data_enums_classes.url_objects import ScrapeItem


class PornPicCrawler(Crawler):
primary_base_domain = URL("https://pornpics.com")

def __init__(self, manager: Manager) -> None:
super().__init__(manager, "pornpics", "PornPics")

"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""

@create_task_id
async def fetch(self, scrape_item: ScrapeItem) -> None:
"""Determines where to send the scrape item based on the url."""
...

@error_handling_wrapper
async def album(self, scrape_item: ScrapeItem) -> None:
"""Scrapes an album."""
...

@error_handling_wrapper
async def image(self, scrape_item: ScrapeItem) -> None:
"""Scrapes an image page."""
...

0 comments on commit 196f07e

Please sign in to comment.