1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-06-04 12:13:33 +08:00

[openload] improvement embedding

support for embedded link with referrer
This commit is contained in:
Bagira
2017-02-06 22:22:36 +01:00
Unverified
parent 2aec7256ae
commit a95a2f148d
+3 -3
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)