mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 07:25:08 +00:00
feat(service): add GEOBLOCK negative geofence
Regions in GEOBLOCK refuse the service and everything else is allowed. A hit stops the run with a region error instead of auto-proxying; the check also covers proxy exits and the remote-dl client region.
This commit is contained in:
@@ -70,6 +70,8 @@ class EXAMPLE(Service):
|
||||
ALIASES = ("EX", "DOMAIN")
|
||||
# GEOFENCE: regions required; the framework warns/blocks if proxy region mismatches.
|
||||
GEOFENCE = ("US", "UK")
|
||||
# GEOBLOCK: the negative form; regions where the service refuses to work, all others allowed.
|
||||
# GEOBLOCK = ("GB",)
|
||||
# TITLE_RE: named groups (?P<...>) parsed in get_titles(). Accepts URL or bare id.
|
||||
TITLE_RE = r"^(?:https?://(?:www\.)?domain\.com/details/)?(?P<title_id>[^/?#]+)"
|
||||
# NO_SUBTITLES: service-level idiom telling the pipeline subs are handled in-band.
|
||||
|
||||
Reference in New Issue
Block a user