projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[generic] Add support for xhamster embeds
[youtube-dl]
/
youtube_dl
/
extractor
/
xhamster.py
diff --git
a/youtube_dl/extractor/xhamster.py
b/youtube_dl/extractor/xhamster.py
index ae3c5962b8061c5d3e136e3ff5120eb0f3aace2f..725e01ac3ab6c158c7ad4ee9e5dcf413181322c6 100644
(file)
--- a/
youtube_dl/extractor/xhamster.py
+++ b/
youtube_dl/extractor/xhamster.py
@@
-149,6
+149,12
@@
class XHamsterEmbedIE(InfoExtractor):
}
}
}
}
+ @staticmethod
+ def _extract_urls(webpage):
+ return [url for _, url in re.findall(
+ r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?xhamster\.com/xembed\.php\?video=\d+)\1',
+ webpage)]
+
def _real_extract(self, url):
video_id = self._match_id(url)
def _real_extract(self, url):
video_id = self._match_id(url)