[pixiv] fix ugoira extraction ... again (#78)
Some animations are not available for mobile devices, so we pretend to be a desktop browser when requesting the ugoira page.
This commit is contained in:
parent
b79f1f2ca7
commit
367b963d37
@ -1,7 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
- Fixed extraction issues for `mangastream`
|
||||
- Fixed extraction issues for `mangastream` and `pixiv`
|
||||
|
||||
## 1.2.0 - 2018-02-16
|
||||
- Added support for:
|
||||
|
@ -71,12 +71,13 @@ class PixivExtractor(Extractor):
|
||||
"""Parse ugoira data"""
|
||||
# get illust page
|
||||
page = self.request(
|
||||
self.illust_url, params={"illust_id": data["id"]},
|
||||
self.illust_url,
|
||||
params={"illust_id": data["id"]},
|
||||
headers={"User-Agent": "Mozilla/5.0"},
|
||||
).text
|
||||
|
||||
# parse page
|
||||
meta = text.extract(page, ' data-meta="', '"')[0]
|
||||
frames = text.extract(text.unescape(meta), ',"frames":[', ']')[0]
|
||||
frames = text.extract(page, ',"frames":[', ']')[0]
|
||||
|
||||
# build url
|
||||
url = re.sub(
|
||||
|
Loading…
x
Reference in New Issue
Block a user