Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add allporncomix crawler #438

Merged
merged 3 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cyberdrop_dl/config_definitions/authentication_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@


class ForumAuth(BaseModel):
allporncomix_xf_user_cookie: str = ""
allporncomix_username: str = ""
allporncomix_password: str = ""
celebforum_xf_user_cookie: str = ""
celebforum_username: str = ""
celebforum_password: str = ""
Expand Down
1 change: 1 addition & 0 deletions cyberdrop_dl/scraper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import TYPE_CHECKING

from cyberdrop_dl import __version__ as current_version
from cyberdrop_dl.scraper.crawlers.allporncomix_crawler import AllPornComixCrawler
from cyberdrop_dl.scraper.crawlers.bunkrr_crawler import BunkrrCrawler
from cyberdrop_dl.scraper.crawlers.celebforum_crawler import CelebForumCrawler
from cyberdrop_dl.scraper.crawlers.chevereto_crawler import CheveretoCrawler
Expand Down
25 changes: 25 additions & 0 deletions cyberdrop_dl/scraper/crawlers/allporncomix_crawler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from yarl import URL

from .xenforo_crawler import PostSelectors, Selector, XenforoCrawler, XenforoSelectors

if TYPE_CHECKING:
from cyberdrop_dl.managers.manager import Manager


class AllPornComixCrawler(XenforoCrawler):
primary_base_domain = URL("https://forum.allporncomix.com")
domain = "allporncomix"
post_selectors = PostSelectors(
content=Selector("div[class=bbWrapper]", None),
images=Selector("img[class*=bbImage]", "data-src"),
date=Selector("time", "datetime"),
attachments=Selector("section[class=message-attachments] .attachmentList .file .file-preview", "href"),
)
selectors = XenforoSelectors(posts=post_selectors)

def __init__(self, manager: Manager) -> None:
super().__init__(manager, self.domain, "AllPornComix")
1 change: 1 addition & 0 deletions cyberdrop_dl/scraper/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ async def check_kemono_page(response: ClientResponse):
return False, "Discord channel page"

filter_dict = {
"allporncomix.com": check_xenforo_last_page,
"celebforum.to": check_xenforo_last_page,
"f95zone.to": check_xenforo_last_page,
"leakedmodels.com": check_xenforo_last_page,
Expand Down
Loading