aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-11-06 21:16:33 +0700
committerSergey M․ <dstftw@gmail.com>2016-11-06 21:16:33 +0700
commitb61cd51869d382d19dbd232cc74e010bb2b1ed12 (patch)
treea33e981acd475ebddbd224c1836c4b9a43c4c6f6 /youtube_dl
parentf420902a3b144c94fba449537e474aca0e101112 (diff)
[yahoo] Add test and improve some content id regex
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/yahoo.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/youtube_dl/extractor/yahoo.py b/youtube_dl/extractor/yahoo.py
index ca92c60c3..4951414e9 100644
--- a/youtube_dl/extractor/yahoo.py
+++ b/youtube_dl/extractor/yahoo.py
@@ -202,6 +202,19 @@ class YahooIE(InfoExtractor):
'skip': 'redirect to https://www.yahoo.com/music',
},
{
+ # yahoo://article/
+ 'url': 'https://www.yahoo.com/movies/video/true-story-trailer-173000497.html',
+ 'info_dict': {
+ 'id': '071c4013-ce30-3a93-a5b2-e0413cd4a9d1',
+ 'ext': 'mp4',
+ 'title': "'True Story' Trailer",
+ 'description': 'True Story',
+ },
+ 'params': {
+ 'skip_download': True,
+ },
+ },
+ {
# ytwnews://cavideo/
'url': 'https://tw.video.yahoo.com/movie-tw/單車天使-中文版預-092316541.html',
'info_dict': {
@@ -282,7 +295,7 @@ class YahooIE(InfoExtractor):
r'"first_videoid"\s*:\s*"([^"]+)"',
r'%s[^}]*"ccm_id"\s*:\s*"([^"]+)"' % re.escape(page_id),
r'<article[^>]data-uuid=["\']([^"\']+)',
- r'yahoo://article/view\?.*\buuid=([^&"\']+)',
+ r'<meta[^<>]+yahoo://article/view\?.*\buuid=([^&"\']+)',
r'<meta[^<>]+["\']ytwnews://cavideo/(?:[^/]+/)+([\da-fA-F-]+)[&"\']',
]
video_id = self._search_regex(