1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[idolcomplex] extract 'id_alnum' metadata (#5171)

This commit is contained in:
Mike Fährmann 2024-02-08 18:29:54 +01:00
parent cf7d6be2d4
commit aee5580c62
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 5 additions and 2 deletions

View File

@ -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,

View File

@ -73,6 +73,7 @@ __tests__ = (
"filename" : "509eccbba54a43cea6b275a65b93c51d",
"height" : 683,
"id" : 694215,
"id_alnum" : "vkr36qdOaZ4",
"md5" : "509eccbba54a43cea6b275a65b93c51d",
"rating" : "g",
"tags" : "lyumos the_witcher shani_(the_witcher) 1girl green_eyes non-asian redhead waistcoat wreath cosplay 3:2_aspect_ratio",
@ -110,6 +111,8 @@ __tests__ = (
"#class" : idolcomplex.IdolcomplexPostExtractor,
"#sha1_content": "694ec2491240787d75bf5d0c75d0082b53a85afd",
"id" : 694215,
"id_alnum" : "vkr36qdOaZ4",
"tags_character": "shani_(the_witcher)",
"tags_copyright": "the_witcher",
"tags_idol" : str,