projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a32a9a7
)
[instagram] Fix extraction (closes #12777)
author
Sergey M․
<dstftw@gmail.com>
Tue, 18 Apr 2017 15:40:26 +0000
(22:40 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 18 Apr 2017 15:40:26 +0000
(22:40 +0700)
youtube_dl/extractor/instagram.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/instagram.py
b/youtube_dl/extractor/instagram.py
index c1921cbcfa35c677c365ed9423c8f6b0e74fb8b3..4667335e03faa2a9fac1433718f17eb714b79d64 100644
(file)
--- a/
youtube_dl/extractor/instagram.py
+++ b/
youtube_dl/extractor/instagram.py
@@
-112,7
+112,8
@@
class InstagramIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
(video_url, description, thumbnail, timestamp, uploader,
webpage = self._download_webpage(url, video_id)
(video_url, description, thumbnail, timestamp, uploader,
- uploader_id, like_count, comment_count, height, width) = [None] * 10
+ uploader_id, like_count, comment_count, comments, height,
+ width) = [None] * 11
shared_data = self._parse_json(
self._search_regex(
shared_data = self._parse_json(
self._search_regex(
@@
-121,7
+122,10
@@
class InstagramIE(InfoExtractor):
video_id, fatal=False)
if shared_data:
media = try_get(
video_id, fatal=False)
if shared_data:
media = try_get(
- shared_data, lambda x: x['entry_data']['PostPage'][0]['media'], dict)
+ shared_data,
+ (lambda x: x['entry_data']['PostPage'][0]['graphql']['shortcode_media'],
+ lambda x: x['entry_data']['PostPage'][0]['media']),
+ dict)
if media:
video_url = media.get('video_url')
height = int_or_none(media.get('dimensions', {}).get('height'))
if media:
video_url = media.get('video_url')
height = int_or_none(media.get('dimensions', {}).get('height'))