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

[instagram] implement 'videos' option (closes #521)

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

View File

@ -770,6 +770,15 @@ Description Include *Story Highlights* when downloading a user profile.
=========== =====
extractor.instagram.videos
--------------------------
=========== =====
Type ``bool``
Default ``true``
Description Download video files.
=========== =====
extractor.kissmanga.captcha
---------------------------
=========== =====

View File

@ -72,7 +72,8 @@
},
"instagram":
{
"highlights": false
"highlights": false,
"videos": true
},
"kissmanga":
{

View File

@ -31,6 +31,7 @@ class InstagramExtractor(Extractor):
self.login()
yield Message.Version, 1
videos = self.config("videos", True)
metadata = self.get_metadata()
for data in self.instagrams():
data.update(metadata)
@ -41,7 +42,11 @@ class InstagramExtractor(Extractor):
data['_extractor'] = InstagramStoriesExtractor
yield Message.Queue, url, data
else:
url = data.get('video_url') or data['display_url']
url = data.get('video_url')
if not url:
url = data['display_url']
elif not videos:
continue
yield Message.Url, url, text.nameext_from_url(url, data)
def login(self):