mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 18:53:21 +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
|
extractor.kissmanga.captcha
|
||||||
---------------------------
|
---------------------------
|
||||||
=========== =====
|
=========== =====
|
||||||
|
@ -72,7 +72,8 @@
|
|||||||
},
|
},
|
||||||
"instagram":
|
"instagram":
|
||||||
{
|
{
|
||||||
"highlights": false
|
"highlights": false,
|
||||||
|
"videos": true
|
||||||
},
|
},
|
||||||
"kissmanga":
|
"kissmanga":
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,7 @@ class InstagramExtractor(Extractor):
|
|||||||
self.login()
|
self.login()
|
||||||
yield Message.Version, 1
|
yield Message.Version, 1
|
||||||
|
|
||||||
|
videos = self.config("videos", True)
|
||||||
metadata = self.get_metadata()
|
metadata = self.get_metadata()
|
||||||
for data in self.instagrams():
|
for data in self.instagrams():
|
||||||
data.update(metadata)
|
data.update(metadata)
|
||||||
@ -41,7 +42,11 @@ class InstagramExtractor(Extractor):
|
|||||||
data['_extractor'] = InstagramStoriesExtractor
|
data['_extractor'] = InstagramStoriesExtractor
|
||||||
yield Message.Queue, url, data
|
yield Message.Queue, url, data
|
||||||
else:
|
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)
|
yield Message.Url, url, text.nameext_from_url(url, data)
|
||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user