diff options
Diffstat (limited to 'gallery_dl/extractor/idolcomplex.py')
| -rw-r--r-- | gallery_dl/extractor/idolcomplex.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gallery_dl/extractor/idolcomplex.py b/gallery_dl/extractor/idolcomplex.py index f70a948..c249a3e 100644 --- a/gallery_dl/extractor/idolcomplex.py +++ b/gallery_dl/extractor/idolcomplex.py @@ -35,7 +35,7 @@ class IdolcomplexExtractor(SankakuExtractor): def _init(self): self.find_pids = re.compile( - r" href=[\"#]/\w\w/posts/([0-9a-f]+)" + r" href=[\"#]/\w\w/posts/(\w+)" ).findall self.find_tags = re.compile( r'tag-type-([^"]+)">\s*<a [^>]*?href="/[^?]*\?tags=([^"]+)' @@ -101,7 +101,7 @@ class IdolcomplexExtractor(SankakuExtractor): page = self.request(url, retries=10).text extr = text.extract_from(page) - tags = extr("<title>", " | ") + pid_alnum = extr('/posts/', '"') vavg = extr('itemprop="ratingValue">', "<") vcnt = extr('itemprop="reviewCount">', "<") pid = extr(">Post ID:", "<") @@ -121,8 +121,8 @@ class IdolcomplexExtractor(SankakuExtractor): data = { "id" : text.parse_int(pid), + "id_alnum" : pid_alnum, "md5" : file_url.rpartition("/")[2].partition(".")[0], - "tags" : text.unescape(tags), "vote_average": text.parse_float(vavg), "vote_count" : text.parse_int(vcnt), "created_at" : created, @@ -206,8 +206,8 @@ class IdolcomplexTagExtractor(IdolcomplexExtractor): if not next_url: return - next_params = text.parse_query(text.unescape(text.unescape( - next_url).lstrip("?/"))) + next_params = text.parse_query(text.unquote(text.unescape( + text.unescape(next_url).lstrip("?/")))) if "next" in next_params: # stop if the same "next" value occurs twice in a row (#265) @@ -258,7 +258,7 @@ class IdolcomplexPostExtractor(IdolcomplexExtractor): """Extractor for single images from idol.sankakucomplex.com""" subcategory = "post" archive_fmt = "{id}" - pattern = BASE_PATTERN + r"/posts?/(?:show/)?([0-9a-f]+)" + pattern = BASE_PATTERN + r"/posts?/(?:show/)?(\w+)" example = "https://idol.sankakucomplex.com/posts/0123456789abcdef" def __init__(self, match): |
