summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hircine/plugins/scrapers/anchira.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/hircine/plugins/scrapers/anchira.py b/src/hircine/plugins/scrapers/anchira.py
index baee4bd..bb60ac9 100644
--- a/src/hircine/plugins/scrapers/anchira.py
+++ b/src/hircine/plugins/scrapers/anchira.py
@@ -19,7 +19,7 @@ from hircine.scraper.types import (
)
from hircine.scraper.utils import open_archive_file, parse_dict
-URL_REGEX = re.compile(r"^https?://anchira\.to/g/")
+SOURCE_REGEX = re.compile(r"^https?://anchira\.to/g/")
class AnchiraYamlScraper(Scraper):
@@ -45,8 +45,14 @@ class AnchiraYamlScraper(Scraper):
self.data = self.load()
source = self.data.get("Source")
- if source and re.match(URL_REGEX, source):
+ if source and re.match(SOURCE_REGEX, source):
self.is_available = True
+ elif not source:
+ # heuristic, but should be good enough
+ url = self.data.get("URL")
+ parody = self.data.get("Parody")
+
+ self.is_available = url is not None and parody is not None
def load(self):
try: