projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dafea0
)
[instagram] Add support for iframe embeds
author
Sergey M․
<dstftw@gmail.com>
Sat, 16 Apr 2016 16:31:05 +0000
(22:31 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 16 Apr 2016 16:31:05 +0000
(22:31 +0600)
youtube_dl/extractor/instagram.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/instagram.py
b/youtube_dl/extractor/instagram.py
index 3a5dd14e656eec1276aa145c4826d463953f16ec..3cbe77ad80f2fc9a03c738745524d5dac98c9d37 100644
(file)
--- a/
youtube_dl/extractor/instagram.py
+++ b/
youtube_dl/extractor/instagram.py
@@
-45,6
+45,12
@@
class InstagramIE(InfoExtractor):
@staticmethod
def _extract_embed_url(webpage):
+ mobj = re.search(
+ r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?instagram\.com/p/[^/]+/embed.*?)\1',
+ webpage)
+ if mobj:
+ return mobj.group('url')
+
blockquote_el = get_element_by_attribute(
'class', 'instagram-media', webpage)
if blockquote_el is None: