[abcnews] Improve and remove duplicate test (closes #12851)

This commit is contained in:
Sergey M․ 2017-05-28 07:05:50 +07:00
parent bc22df29c4
commit 164fcbfeb7
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -13,10 +13,14 @@
class AbcNewsVideoIE(AMPIE): class AbcNewsVideoIE(AMPIE):
IE_NAME = 'abcnews:video' IE_NAME = 'abcnews:video'
_VALID_URL = r'''(?x) _VALID_URL = r'''(?x)
https?://abcnews\.go\.com/ https?://
(?:[^/]+/video/(?P<display_id>[0-9a-z-]+)-| abcnews\.go\.com/
video/embed\?id=) (?:
(?P<id>\d+)''' [^/]+/video/(?P<display_id>[0-9a-z-]+)-|
video/embed\?.*?\bid=
)
(?P<id>\d+)
'''
_TESTS = [{ _TESTS = [{
'url': 'http://abcnews.go.com/ThisWeek/video/week-exclusive-irans-foreign-minister-zarif-20411932', 'url': 'http://abcnews.go.com/ThisWeek/video/week-exclusive-irans-foreign-minister-zarif-20411932',
@ -35,15 +39,7 @@ class AbcNewsVideoIE(AMPIE):
}, },
}, { }, {
'url': 'http://abcnews.go.com/video/embed?id=46979033', 'url': 'http://abcnews.go.com/video/embed?id=46979033',
'md5': 'd19d160cfa8372fc197f406d4821dd9f', 'only_matching': True,
'info_dict': {
'id': '46979033',
'ext': 'flv',
'title': 'Nikki Haley reacts to French election results',
'description': 'md5:df1b5ad1b8ad76c4d4e01d3c67d6b38e',
'duration': 274,
'thumbnail': r're:^https?://.*\.jpg$',
},
}, { }, {
'url': 'http://abcnews.go.com/2020/video/2020-husband-stands-teacher-jail-student-affairs-26119478', 'url': 'http://abcnews.go.com/2020/video/2020-husband-stands-teacher-jail-student-affairs-26119478',
'only_matching': True, 'only_matching': True,