[openload] improvement embedding

support for embedded link with referrer
This commit is contained in:
Bagira 2017-02-06 22:22:36 +01:00
parent 2aec7256ae
commit a95a2f148d

View File

@ -60,9 +60,9 @@ class OpenloadIE(InfoExtractor):
@staticmethod
def _extract_urls(webpage):
return re.findall(
r'<iframe[^>]+src=["\']((?:https?://)?(?:openload\.(?:co|io)|oload\.tv)/embed/[a-zA-Z0-9-_]+)',
webpage)
return [url for _, url in re.findall(
r'<iframe[^>]+src=(["\'])(?:[^\?]+\?|[^=]+=|)(?P<url>(?:https?://|//|)(?:openload\.(?:co|io)|oload\.tv)/(?:f|embed)/[^"\']+)\1',
webpage)]
def _real_extract(self, url):
video_id = self._match_id(url)