Browse Source

[instagram] Add support for iframe embeds

totalwebcasting
Sergey M․ 9 years ago
parent
commit
c23533a100
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      youtube_dl/extractor/instagram.py

+ 6
- 0
youtube_dl/extractor/instagram.py View File

@ -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:


Loading…
Cancel
Save