goon/app/connectors/direct_scrapers/watchporn.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

19 lines
569 B
Python

"""watchporn.to — direct HTML scrape.
Search: `https://watchporn.to/page/<n>/?s=<q>` (WordPress).
Scene URL: `https://watchporn.to/videos/<slug>/`.
"""
from __future__ import annotations
import re
from app.connectors.direct_scrapers._search_base import BaseSearchScraper
class WatchPornScraper(BaseSearchScraper):
sitetag = "watchporn"
_search_url_template = "https://watchporn.to/page/{page}/?s={query}"
_scene_url_re = re.compile(
r'href="(?P<url>https://watchporn\.to/videos/(?P<slug>[a-z0-9][a-z0-9\-]+))/"',
re.IGNORECASE,
)