goon/app/connectors/direct_scrapers/sxyprn.py
goon-foss ad0284585b Initial commit
Goon — self-hosted aggregator for adult-content scene metadata.

Indexes scenes from TPDB, StashDB, and 30+ public adult tube sites.
Cross-source deduplication via perceptual hash + Levenshtein distance.
FastAPI backend + APScheduler worker + React Native (Expo) mobile client.

FOSS, ad-free, donation-funded. See README for details.
2026-05-20 10:10:22 +02:00

24 lines
859 B
Python

"""sxyprn.com — direct HTML scrape search results.
Sxyprn search jest oparte na `?type=videos&query=<q>` GET endpoint który zwraca
HTML strony z linkami. Scene URL format: `https://sxyprn.com/post/<post_id>.html`.
Page'owanie sxyprn niespójne — często single-page results dla query (~24 wyników).
"""
from __future__ import annotations
import re
from app.connectors.direct_scrapers._search_base import BaseSearchScraper
class SxyPrnScraper(BaseSearchScraper):
sitetag = "sxyprncom"
_search_url_template = "https://sxyprn.com/?type=videos&query={query}&page={page}"
_scene_url_re = re.compile(
r'href="(?P<url>/post/(?P<slug>[a-z0-9]+))\.html"',
)
def _title_from_slug(self, slug: str) -> str:
# sxyprn post ID to nieczytelny hash — placeholder, title backfill przy resolve.
return f"sxyprn:{slug}"