1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-03 00:05:36 +08:00

Improve regex

This commit is contained in:
Urgau 2018-06-12 22:41:48 +02:00 committed by GitHub
parent cd6a4939ef
commit ce19545c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,8 +31,8 @@ class FoxNewsIE(AMPIE):
'info_dict': {
'id': '3922535568001',
'ext': 'mp4',
'title': 'Rep. Luis Gutierrez on if Obama\'s immigration plan is legal',
'description': 'Congressman discusses president\'s plan',
'title': "Rep. Luis Gutierrez on if Obama's immigration plan is legal",
'description': "Congressman discusses president's plan",
'duration': 292,
'timestamp': 1417662047,
'upload_date': '20141204',
@ -102,7 +102,7 @@ class FoxNewsArticleIE(InfoExtractor):
webpage = self._download_webpage(url, display_id)
video_id = self._html_search_regex(
(r'data-video-id=([\'"])(?P<id>[^\'"]+)\1', r'https?.*foxnews.*video_id=(?P<id>[\d]+)'),
(r'data-video-id=([\'"])(?P<id>[^\'"]+)\1', r'<amp-iframe.*src="https?.*foxnews.*video_id=(?P<id>[\d]+).*>'),
webpage, 'video ID', group='id')
return self.url_result(
'http://video.foxnews.com/v/' + video_id,