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

[vsco] implement 'videos' option

This commit is contained in:
Mike Fährmann 2019-12-19 17:20:51 +01:00
parent 95c90722ee
commit bf658fd84b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 16 additions and 0 deletions

View File

@ -1082,6 +1082,15 @@ Description Control video download behavior.
=========== =====
extractor.vsco.videos
---------------------
=========== =====
Type ``bool``
Default ``true``
Description Download video files.
=========== =====
extractor.wallhaven.api-key
---------------------------
=========== =====

View File

@ -146,6 +146,10 @@
"retweets": true,
"videos": false
},
"vsco":
{
"videos": true
},
"wallhaven":
{
"api-key": null

View File

@ -29,11 +29,14 @@ class VscoExtractor(Extractor):
self.user = match.group(1).lower()
def items(self):
videos = self.config("videos", True)
yield Message.Version, 1
yield Message.Directory, {"user": self.user}
for img in self.images():
if img["is_video"]:
if not videos:
continue
url = "https://" + img["video_url"]
else:
base = img["responsive_url"].partition("/")[2]