diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2014-04-04 19:01:18 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2014-04-04 19:01:18 +0200 |
commit | 659eb98a534223af42b06703223898863b551337 (patch) | |
tree | 2a6254c68ab680186f1a977d2d691ab7de97c6e9 /youtube_dl | |
parent | 43df5a7e7129c68f636ad6e60006dabc31f6fd56 (diff) |
[breakcom] Fix YouTube videos extraction (fixes #2699)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/breakcom.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/breakcom.py b/youtube_dl/extractor/breakcom.py index 85635d1cc..1bfc9f35b 100644 --- a/youtube_dl/extractor/breakcom.py +++ b/youtube_dl/extractor/breakcom.py @@ -27,9 +27,10 @@ class BreakIE(InfoExtractor): webpage, 'info json', flags=re.DOTALL) info = json.loads(info_json) video_url = info['videoUri'] - m_youtube = re.search(r'(https?://www\.youtube\.com/watch\?v=.*)', video_url) - if m_youtube is not None: - return self.url_result(m_youtube.group(1), 'Youtube') + youtube_id = info.get('youtubeId') + if youtube_id: + return self.url_result(youtube_id, 'Youtube') + final_url = video_url + '?' + info['AuthToken'] return { 'id': video_id, |