aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/instagram.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-01-26 21:46:51 +0600
committerSergey M․ <dstftw@gmail.com>2016-01-26 21:46:51 +0600
commitfb4b3458000bff87f2b083f9a5e6853c043d032d (patch)
tree22cda891c3318b59ee2a862a721f127f5828c685 /youtube_dl/extractor/instagram.py
parentaf9c2a07aea530b3bee560a953e94ac92fcd49c9 (diff)
downloadyoutube-dl-fb4b3458000bff87f2b083f9a5e6853c043d032d.tar.xz
[instagram] Make description optional (Closes #8326)
Diffstat (limited to 'youtube_dl/extractor/instagram.py')
-rw-r--r--youtube_dl/extractor/instagram.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/youtube_dl/extractor/instagram.py b/youtube_dl/extractor/instagram.py
index e5e16ca3b..ed3e07118 100644
--- a/youtube_dl/extractor/instagram.py
+++ b/youtube_dl/extractor/instagram.py
@@ -22,6 +22,18 @@ class InstagramIE(InfoExtractor):
'description': 'md5:1f17f0ab29bd6fe2bfad705f58de3cb8',
}
}, {
+ # missing description
+ 'url': 'https://www.instagram.com/p/BA-pQFBG8HZ/?taken-by=britneyspears',
+ 'info_dict': {
+ 'id': 'BA-pQFBG8HZ',
+ 'ext': 'mp4',
+ 'uploader_id': 'britneyspears',
+ 'title': 'Video by britneyspears',
+ },
+ 'params': {
+ 'skip_download': True,
+ },
+ }, {
'url': 'https://instagram.com/p/-Cmh1cukG2/',
'only_matching': True,
}]
@@ -32,8 +44,8 @@ class InstagramIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
uploader_id = self._search_regex(r'"owner":{"username":"(.+?)"',
webpage, 'uploader id', fatal=False)
- desc = self._search_regex(r'"caption":"(.*?)"', webpage, 'description',
- fatal=False)
+ desc = self._search_regex(
+ r'"caption":"(.+?)"', webpage, 'description', default=None)
return {
'id': video_id,