projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
af9c2a0
)
[instagram] Make description optional (Closes #8326)
author
Sergey M․
<dstftw@gmail.com>
Tue, 26 Jan 2016 15:46:51 +0000
(21:46 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 26 Jan 2016 15:46:51 +0000
(21:46 +0600)
youtube_dl/extractor/instagram.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/instagram.py
b/youtube_dl/extractor/instagram.py
index e5e16ca3b2aa15b64b253496e129cf7813468abe..ed3e0711815bc36a6b8702c994087ae5827f5dab 100644
(file)
--- a/
youtube_dl/extractor/instagram.py
+++ b/
youtube_dl/extractor/instagram.py
@@
-21,6
+21,18
@@
class InstagramIE(InfoExtractor):
'title': 'Video by naomipq',
'description': 'md5:1f17f0ab29bd6fe2bfad705f58de3cb8',
}
'title': 'Video by naomipq',
'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,
}, {
'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)
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=Fals
e)
+ desc = self._search_regex(
+
r'"caption":"(.+?)"', webpage, 'description', default=Non
e)
return {
'id': video_id,
return {
'id': video_id,