summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/hircine/plugins/scrapers/anchira.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/hircine/plugins/scrapers/anchira.py b/src/hircine/plugins/scrapers/anchira.py
index aa224b9..baee4bd 100644
--- a/src/hircine/plugins/scrapers/anchira.py
+++ b/src/hircine/plugins/scrapers/anchira.py
@@ -17,7 +17,7 @@ from hircine.scraper.types import (
Title,
World,
)
-from hircine.scraper.utils import open_archive_file
+from hircine.scraper.utils import open_archive_file, parse_dict
URL_REGEX = re.compile(r"^https?://anchira\.to/g/")
@@ -66,16 +66,7 @@ class AnchiraYamlScraper(Scraper):
"Tags": self.parse_tag,
}
- for field, parser in parsers.items():
- if field not in self.data:
- continue
-
- value = self.data[field]
-
- if isinstance(value, list):
- yield from [lambda i=x: parser(i) for x in value]
- else:
- yield lambda: parser(value)
+ yield from parse_dict(parsers, self.data)
yield Language(enums.Language.EN)
yield Direction(enums.Direction.RIGHT_TO_LEFT)