From 9dea5cbc01e2d447d77d5fb205acb1d17fe9c55f Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Thu, 16 Jan 2025 18:24:09 +0100 Subject: backend/plugins: Have anchira scraper also match on hentainexus.com --- src/hircine/plugins/scrapers/anchira.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hircine/plugins/scrapers/anchira.py b/src/hircine/plugins/scrapers/anchira.py index bb60ac9..1e89ffb 100644 --- a/src/hircine/plugins/scrapers/anchira.py +++ b/src/hircine/plugins/scrapers/anchira.py @@ -19,7 +19,8 @@ from hircine.scraper.types import ( ) from hircine.scraper.utils import open_archive_file, parse_dict -SOURCE_REGEX = re.compile(r"^https?://anchira\.to/g/") +ANCHIRA_REGEX = re.compile(r"^https?://anchira\.to/g/") +NEXUS_REGEX = re.compile(r"^https?://hentainexus\.com/") class AnchiraYamlScraper(Scraper): @@ -45,9 +46,10 @@ class AnchiraYamlScraper(Scraper): self.data = self.load() source = self.data.get("Source") - if source and re.match(SOURCE_REGEX, source): - self.is_available = True - elif not source: + if source: + if re.match(ANCHIRA_REGEX, source) or re.match(NEXUS_REGEX, source): + self.is_available = True + else: # heuristic, but should be good enough url = self.data.get("URL") parody = self.data.get("Parody") -- cgit v1.2.3-2-gb3c3