From 164fcbfeb75787cfeb1f0a84188ba4c11ac4a009 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Sun, 28 May 2017 07:05:50 +0700 Subject: [PATCH] [abcnews] Improve and remove duplicate test (closes #12851) --- youtube_dl/extractor/abcnews.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/youtube_dl/extractor/abcnews.py b/youtube_dl/extractor/abcnews.py index e18be2497..74d54560c 100644 --- a/youtube_dl/extractor/abcnews.py +++ b/youtube_dl/extractor/abcnews.py @@ -13,10 +13,14 @@ from ..compat import compat_urlparse class AbcNewsVideoIE(AMPIE): IE_NAME = 'abcnews:video' _VALID_URL = r'''(?x) - https?://abcnews\.go\.com/ - (?:[^/]+/video/(?P[0-9a-z-]+)-| - video/embed\?id=) - (?P\d+)''' + https?:// + abcnews\.go\.com/ + (?: + [^/]+/video/(?P[0-9a-z-]+)-| + video/embed\?.*?\bid= + ) + (?P\d+) + ''' _TESTS = [{ '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', - 'md5': 'd19d160cfa8372fc197f406d4821dd9f', - 'info_dict': { - 'id': '46979033', - 'ext': 'flv', - 'title': 'Nikki Haley reacts to French election results', - 'description': 'md5:df1b5ad1b8ad76c4d4e01d3c67d6b38e', - 'duration': 274, - 'thumbnail': r're:^https?://.*\.jpg$', - }, + 'only_matching': True, }, { 'url': 'http://abcnews.go.com/2020/video/2020-husband-stands-teacher-jail-student-affairs-26119478', 'only_matching': True, -- 2.40.0