[screencast] fix url extract for multiple file types

This commit is contained in:
enigmaquip 2017-10-28 20:46:26 -06:00 committed by GitHub
parent 6d0630d880
commit 14775e07e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,12 +83,12 @@ class ScreencastIE(InfoExtractor):
video_url = video_url_raw.replace('http%3A', 'http:') video_url = video_url_raw.replace('http%3A', 'http:')
if video_url is None: if video_url is None:
video_meta = self._html_search_meta( video_url = self._html_search_meta(
'og:video', webpage, default=None) 'og:video', webpage, default=None)
if video_meta:
video_url = self._search_regex( if video_url is None:
r'src=(.*?)(?:$|&)', video_meta, video_url = self._html_search_regex(
'meta tag video URL', default=None) r'"MediaContentUrl":"([^"]+)"', webpage, 'embeds', default=None)
if video_url is None: if video_url is None:
raise ExtractorError('Cannot find video') raise ExtractorError('Cannot find video')