1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

[pixiv] add option to skip ugoiras

This commit is contained in:
Mike Fährmann 2016-07-20 14:19:46 +02:00
parent 59445c821b
commit 3136278f79
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -32,6 +32,7 @@ class PixivUserExtractor(Extractor):
self.artist_id = match.group(1)
self.api = PixivAPI(self.session)
self.api_call = self.api.user_works
self.load_ugoira = config.interpolate(("extractor", "pixiv", "ugoira"), True)
def items(self):
metadata = self.get_job_metadata()
@ -49,6 +50,8 @@ class PixivUserExtractor(Extractor):
timestamp = ""
if work["type"] == "ugoira":
if not self.load_ugoira:
continue
url, framelist = self.parse_ugoira(work)
work["extension"] = "zip"
yield Message.Url, url, work
@ -146,6 +149,7 @@ class PixivWorkExtractor(PixivUserExtractor):
def __init__(self, match):
PixivUserExtractor.__init__(self, match)
self.illust_id = match.group(1)
self.load_ugoira = True
self.work = None
def get_works(self):