[ESPN] Applied requested fixes for PR #13549

This commit is contained in:
Parmjit Virk 2017-07-03 19:28:32 -05:00
parent 3f21e1ec5a
commit 0f427b1cad

View File

@ -10,7 +10,19 @@ from ..utils import (
class ESPNIE(InfoExtractor):
_VALID_URL = r'https?://(?:(?:(\w+\.)+)?espn\.go|(?:www\.)?espn)\.com/(?:video/clip(?:\?.*?\bid=|/_/id/)|watch/player\?.*?\bid=)(?P<id>\d+)'
_VALID_URL = r'''(?x)
https?://
(?:
(?:(?:\w+\.)+)?espn\.go|
(?:www\.)?espn
)\.com/
(?:
video/clip(?:\?.*?\bid=|/_/id/)|
watch/player\?.*?\bid=
)
(?P<id>\d+)
'''
_TESTS = [{
'url': 'http://espn.go.com/video/clip?id=10365079',
'info_dict': {
@ -40,60 +52,16 @@ class ESPNIE(InfoExtractor):
'expected_warnings': ['Unable to download f4m manifest'],
}, {
'url': 'http://nonredline.sports.espn.go.com/video/clip?id=19744672',
'info_dict': {
'id': '19744672',
'ext': 'mp4',
'title': 'Aggies use 2016 season as motivation',
'description': 'md5:2fe30038633f86408a184ec676c5fdac',
'timestamp': 1498519201,
'upload_date': '20170626',
},
'params': {
'skip_download': True,
},
'expected_warnings': ['Unable to download f4m manifest'],
'only_matching': True,
}, {
'url': 'https://cdn.espn.go.com/video/clip/_/id/19771774',
'info_dict': {
'id': '19771774',
'ext': 'mp4',
'title': 'Coach Cal to the Knicks? Not so fast',
'description': 'md5:a60393eaee9c203dd4184c48c308651b',
'timestamp': 1498806684,
'upload_date': '20170630',
},
'params': {
'skip_download': True,
},
'expected_warnings': ['Unable to download f4m manifest'],
'only_matching': True,
}, {
'url': 'http://www.espn.com/watch/player?id=19141491',
'info_dict': {
'id': '19141491',
'ext': 'mp4',
'title': 'Stephen A.: Lynch was wrong for slapping phone out of fan\'s hand',
'description': 'md5:9b31cf7b31e85c6dfcdefd11571e6c8e',
'timestamp': 1492011670,
'upload_date': '20170412',
},
'params': {
'skip_download': True,
},
'expected_warnings': ['Unable to download f4m manifest'],
'only_matching': True,
}, {
'url': 'http://www.espn.com/watch/player?bucketId=257&id=19505875',
'info_dict': {
'id': '19505875',
'ext': 'mp4',
'title': 'Six-year-old Fuller nails first word at Spelling Bee',
'description': 'md5:f90babb45b196d7c8ca1d295bb68e36a',
'timestamp': 1496252167,
'upload_date': '20170531',
},
'params': {
'skip_download': True,
},
'expected_warnings': ['Unable to download f4m manifest'],
'only_matching': True,
}, {
'url': 'http://www.espn.com/video/clip?id=10365079',
'only_matching': True,