diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-04-23 21:49:54 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-04-23 21:49:54 +0600 |
commit | 6447353f52dc4b2b5926d3d9a3a28d3a7a242b4d (patch) | |
tree | f685f3abf5ae44909cc8f2aa300eeab8d2094bc1 | |
parent | b46ed49996669a5e602042ae4d357f2ad952af58 (diff) |
[cracked] Add support for youtube embeds
-rw-r--r-- | youtube_dl/extractor/cracked.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/extractor/cracked.py b/youtube_dl/extractor/cracked.py index e579863df..8b381dd3a 100644 --- a/youtube_dl/extractor/cracked.py +++ b/youtube_dl/extractor/cracked.py @@ -30,8 +30,15 @@ class CrackedIE(InfoExtractor): webpage = self._download_webpage(url, video_id) + youtube_url = self._search_regex( + r'<iframe[^>]+src="((?:https?:)?//www\.youtube\.com/embed/[^"]+)"', + webpage, 'youtube url', default=None) + if youtube_url: + return self.url_result(youtube_url) + video_url = self._html_search_regex( - [r'var\s+CK_vidSrc\s*=\s*"([^"]+)"', r'<video\s+src="([^"]+)"'], webpage, 'video URL') + [r'var\s+CK_vidSrc\s*=\s*"([^"]+)"', r'<video\s+src="([^"]+)"'], + webpage, 'video URL') title = self._search_regex( [r'property="?og:title"?\s+content="([^"]+)"', r'class="?title"?>([^<]+)'], |