"""mypornerleak.com — direct HTML scrape.

Search: `https://mypornerleak.com/page/<n>/?s=<q>`.
Scene URL: `https://mypornerleak.com/<slug>/`.
"""
from __future__ import annotations

import re

from app.connectors.direct_scrapers._search_base import BaseSearchScraper


class MyPornerLeakScraper(BaseSearchScraper):
    sitetag = "mypornerleakcom"
    _search_url_template = "https://mypornerleak.com/page/{page}/?s={query}"
    _scene_url_re = re.compile(
        r'href="(?P<url>https://mypornerleak\.com/(?P<slug>[a-z0-9][a-z0-9\-]+))/"',
        re.IGNORECASE,
    )
