aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/yahoo.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-03-31 02:21:27 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-03-31 02:21:27 +0800
commita28ccbabc60c81016c851ae46365be377ea83795 (patch)
treead29e11bf1d2c05b1b458b70dfe40fc0b19ea1c3 /youtube_dl/extractor/yahoo.py
parentedd7344820303e550c9daae1ef591be8068ac47e (diff)
[Yahoo/NBCSports] Fix #5226
Diffstat (limited to 'youtube_dl/extractor/yahoo.py')
-rw-r--r--youtube_dl/extractor/yahoo.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/youtube_dl/extractor/yahoo.py b/youtube_dl/extractor/yahoo.py
index 97dbac4cc..6e72f1e55 100644
--- a/youtube_dl/extractor/yahoo.py
+++ b/youtube_dl/extractor/yahoo.py
@@ -129,6 +129,15 @@ class YahooIE(InfoExtractor):
}, {
'url': 'https://gma.yahoo.com/pizza-delivery-man-surprised-huge-tip-college-kids-195200785.html',
'only_matching': True,
+ }, {
+ 'note': 'NBC Sports embeds',
+ 'url': 'http://sports.yahoo.com/blogs/ncaab-the-dagger/tyler-kalinoski-s-buzzer-beater-caps-davidson-s-comeback-win-185609842.html?guid=nbc_cbk_davidsonbuzzerbeater_150313',
+ 'info_dict': {
+ 'id': '9CsDKds0kvHI',
+ 'ext': 'flv',
+ 'description': 'md5:df390f70a9ba7c95ff1daace988f0d8d',
+ 'title': 'Tyler Kalinoski hits buzzer-beater to lift Davidson',
+ }
}
]
@@ -151,6 +160,11 @@ class YahooIE(InfoExtractor):
items = json.loads(items_json)
video_id = items[0]['id']
return self._get_info(video_id, display_id, webpage)
+ # Look for NBCSports iframes
+ iframe_m = re.search(
+ r'<iframe[^>]+src="(?P<url>https?://vplayer\.nbcsports\.com/[^"]+)"', webpage)
+ if iframe_m:
+ return self.url_result(iframe_m.group('url'), 'NBCSports')
items_json = self._search_regex(
r'mediaItems: ({.*?})$', webpage, 'items', flags=re.MULTILINE,