0
0
Fork 0

[breakcom] Fix YouTube videos extraction (fixes #2699)

main
Jaime Marquínez Ferrándiz 2014-04-04 19:01:18 +02:00
parent 43df5a7e71
commit 659eb98a53
1 changed files with 4 additions and 3 deletions

View File

@ -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,