From bf658fd84b6c12757bd64b3e23fcb8592db40ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 19 Dec 2019 17:20:51 +0100 Subject: [PATCH] [vsco] implement 'videos' option --- docs/configuration.rst | 9 +++++++++ docs/gallery-dl.conf | 4 ++++ gallery_dl/extractor/vsco.py | 3 +++ 3 files changed, 16 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index bffeeddb..078c761b 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -1082,6 +1082,15 @@ Description Control video download behavior. =========== ===== +extractor.vsco.videos +--------------------- +=========== ===== +Type ``bool`` +Default ``true`` +Description Download video files. +=========== ===== + + extractor.wallhaven.api-key --------------------------- =========== ===== diff --git a/docs/gallery-dl.conf b/docs/gallery-dl.conf index a0f59d7c..2a25b1d3 100644 --- a/docs/gallery-dl.conf +++ b/docs/gallery-dl.conf @@ -146,6 +146,10 @@ "retweets": true, "videos": false }, + "vsco": + { + "videos": true + }, "wallhaven": { "api-key": null diff --git a/gallery_dl/extractor/vsco.py b/gallery_dl/extractor/vsco.py index 1e9a2605..a24d3fe1 100644 --- a/gallery_dl/extractor/vsco.py +++ b/gallery_dl/extractor/vsco.py @@ -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]