mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[instagram] implement 'videos' option (closes #521)
This commit is contained in:
parent
1921c127a5
commit
95c90722ee
@ -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
|
||||
---------------------------
|
||||
=========== =====
|
||||
|
@ -72,7 +72,8 @@
|
||||
},
|
||||
"instagram":
|
||||
{
|
||||
"highlights": false
|
||||
"highlights": false,
|
||||
"videos": true
|
||||
},
|
||||
"kissmanga":
|
||||
{
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user