1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[pixiv] fix ugoira extraction (closes #78)

This commit is contained in:
Mike Fährmann 2018-02-19 08:51:09 +01:00
parent 731ffd4986
commit b79f1f2ca7
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -19,7 +19,7 @@ class PixivExtractor(Extractor):
category = "pixiv"
directory_fmt = ["{category}", "{user[id]} {user[account]}"]
filename_fmt = "{category}_{user[id]}_{id}{num}.{extension}"
archive_fmt = "{id}{num}"
archive_fmt = "{id}{num}.{extension}"
illust_url = "https://www.pixiv.net/member_illust.php?mode=medium"
def __init__(self):
@ -75,7 +75,8 @@ class PixivExtractor(Extractor):
).text
# parse page
frames = text.extract(page, ',"frames":[', ']')[0]
meta = text.extract(page, ' data-meta="', '"')[0]
frames = text.extract(text.unescape(meta), ',"frames":[', ']')[0]
# build url
url = re.sub(
@ -192,6 +193,13 @@ class PixivWorkExtractor(PixivExtractor):
"img/2017/04/25/07/33/29/62568267_p0.png"), {
"url": "71b8bbd070d6b03a75ca4afb89f64d1445b2278d",
}),
# ugoira
(("https://www.pixiv.net/member_illust.php"
"?mode=medium&illust_id=66806629"), {
"pattern": (r"https?://i\.pximg\.net/img-zip-ugoira/.*/"
r"66806629_ugoira1920x1080\.zip|text:.+"),
"count": 2,
}),
("https://www.pixiv.net/i/966412", None),
("http://img.pixiv.net/img/soundcross/42626136.jpg", None),
("http://i2.pixiv.net/img76/img/snailrin/42672235.jpg", None),