[instagram] Add support for iframe embeds
parent
0dafea02e6
commit
c23533a100
|
@ -45,6 +45,12 @@ class InstagramIE(InfoExtractor):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _extract_embed_url(webpage):
|
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(
|
blockquote_el = get_element_by_attribute(
|
||||||
'class', 'instagram-media', webpage)
|
'class', 'instagram-media', webpage)
|
||||||
if blockquote_el is None:
|
if blockquote_el is None:
|
||||||
|
|
Loading…
Reference in New Issue