X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fgeneric.py;h=f4500e931ba1a2c72fa6e4e87e120e317e236e56;hb=753fad4adc32b57a0d18518fddd06d2411d09635;hp=fbbc79a574ca03f1e483738a726f2fde0bf6b21d;hpb=f076b63821100af17379ed8b470e508846bb8432;p=youtube-dl diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index fbbc79a57..f4500e931 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -524,6 +524,19 @@ class GenericIE(InfoExtractor): 'upload_date': '20150126', }, 'add_ie': ['Viddler'], + }, + # jwplayer YouTube + { + 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/', + 'info_dict': { + 'id': 'Mrj4DVp2zeA', + 'ext': 'mp4', + 'upload_date': '20150204', + 'uploader': 'The National Archives UK', + 'description': 'md5:a236581cd2449dd2df4f93412f3f01c6', + 'uploader_id': 'NationalArchives08', + 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue', + }, } ] @@ -1034,7 +1047,12 @@ class GenericIE(InfoExtractor): # Look for embedded sbs.com.au player mobj = re.search( - r']+?src=(["\'])(?Phttps?://(?:www\.)sbs\.com\.au/ondemand/video/single/.+?)\1', + r'''(?x) + (?: + ]+?src= + ) + (["\'])(?Phttps?://(?:www\.)?sbs\.com\.au/ondemand/video/.+?)\1''', webpage) if mobj is not None: return self.url_result(mobj.group('url'), 'SBS') @@ -1065,6 +1083,8 @@ class GenericIE(InfoExtractor): return self.url_result(mobj.group('url'), 'Livestream') def check_video(vurl): + if YoutubeIE.suitable(vurl): + return True vpath = compat_urlparse.urlparse(vurl).path vext = determine_ext(vpath) return '.' in vpath and vext not in ('swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml') @@ -1082,7 +1102,8 @@ class GenericIE(InfoExtractor): JWPlayerOptions| jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup ) - .*?file\s*:\s*["\'](.*?)["\']''', webpage)) + .*? + ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage)) if not found: # Broaden the search a little bit found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))