[booru] refactor 'tags' and 'notes' extraction

- move HTML request for post pages into its own function
- move gelbooru_v02.py notes extraction to gelbooru.py
  since it only works there
- clean up some code
This commit is contained in:
Mike Fährmann
2022-10-31 12:01:19 +01:00
parent 48bbe1ccf6
commit 775895f44b
7 changed files with 57 additions and 75 deletions

View File

@@ -63,7 +63,7 @@ class SankakuExtractor(BooruExtractor):
def _check_expired(self, response):
return not response.history or '.com/expired.png' not in response.url
def _extended_tags(self, post):
def _tags(self, post, page):
tags = collections.defaultdict(list)
types = self.TAG_TYPES
for tag in post["tags"]: