forked from jbsparrow/CyberDropDownloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ac36f1
commit 196f07e
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.""" | ||
... |