diff options
author | Tithen-Firion <tithen.firion.0@gmail.com> | 2017-04-26 21:21:17 +0200 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-05-28 07:06:29 +0700 |
commit | bc22df29c49523e41abb84eb09232784b2e07d34 (patch) | |
tree | c22cbd56d53aca3f282c1cdb29ebf6fb54c9dfdb /youtube_dl | |
parent | 7e688d2f6ade3e39423161c7837e48ca2b8243a4 (diff) |
[abcnews] Add support for embed URLs
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/abcnews.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/youtube_dl/extractor/abcnews.py b/youtube_dl/extractor/abcnews.py index 4f56c4c11..e18be2497 100644 --- a/youtube_dl/extractor/abcnews.py +++ b/youtube_dl/extractor/abcnews.py @@ -12,7 +12,11 @@ from ..compat import compat_urlparse class AbcNewsVideoIE(AMPIE): IE_NAME = 'abcnews:video' - _VALID_URL = r'https?://abcnews\.go\.com/[^/]+/video/(?P<display_id>[0-9a-z-]+)-(?P<id>\d+)' + _VALID_URL = r'''(?x) + https?://abcnews\.go\.com/ + (?:[^/]+/video/(?P<display_id>[0-9a-z-]+)-| + video/embed\?id=) + (?P<id>\d+)''' _TESTS = [{ 'url': 'http://abcnews.go.com/ThisWeek/video/week-exclusive-irans-foreign-minister-zarif-20411932', @@ -30,6 +34,17 @@ class AbcNewsVideoIE(AMPIE): 'skip_download': True, }, }, { + '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$', + }, + }, { 'url': 'http://abcnews.go.com/2020/video/2020-husband-stands-teacher-jail-student-affairs-26119478', 'only_matching': True, }] |