aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <[email protected]>2015-12-31 19:56:54 +0100
committerJaime Marquínez Ferrándiz <[email protected]>2015-12-31 20:04:17 +0100
commit930087f2f69d887d768f234c5dc4563c5ad86ad6 (patch)
tree630b651b6399d3ccfa69da2559253e893f023b4a
parent9f9f7664b543f2691a9100920a8b5962d4608bf9 (diff)
downloadyoutube-dl-930087f2f69d887d768f234c5dc4563c5ad86ad6.tar.gz
youtube-dl-930087f2f69d887d768f234c5dc4563c5ad86ad6.zip
[espn] Support 'intl' videos (#7858)
-rw-r--r--youtube_dl/extractor/espn.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/youtube_dl/extractor/espn.py b/youtube_dl/extractor/espn.py
index 24780b82d..0a917f9f6 100644
--- a/youtube_dl/extractor/espn.py
+++ b/youtube_dl/extractor/espn.py
@@ -18,6 +18,18 @@ class ESPNIE(InfoExtractor):
'skip_download': True,
},
}, {
+ # intl video, from http://www.espnfc.us/video/mls-highlights/150/video/2743663/must-see-moments-best-of-the-mls-season
+ 'url': 'http://espn.go.com/video/clip?id=2743663',
+ 'info_dict': {
+ 'id': '50NDFkeTqRHB0nXBOK-RGdSG5YQPuxHg',
+ 'ext': 'mp4',
+ 'title': 'int_151206_Must_See_Moments_Best_of_MLS_2015_season',
+ },
+ 'params': {
+ # m3u8 download
+ 'skip_download': True,
+ },
+ }, {
'url': 'https://espn.go.com/video/iframe/twitter/?cms=espn&id=10365079',
'only_matching': True,
}, {
@@ -43,12 +55,16 @@ class ESPNIE(InfoExtractor):
r'class="video-play-button"[^>]+data-id="(\d+)',
webpage, 'video id')
+ cms = 'espn'
+ if 'data-source="intl"' in webpage:
+ cms = 'intl'
+ player_url = 'https://espn.go.com/video/iframe/twitter/?id=%s&cms=%s' % (video_id, cms)
player = self._download_webpage(
- 'https://espn.go.com/video/iframe/twitter/?id=%s' % video_id, video_id)
+ player_url, video_id)
pcode = self._search_regex(
r'["\']pcode=([^"\']+)["\']', player, 'pcode')
return self.url_result(
- 'ooyalaexternal:espn:%s:%s' % (video_id, pcode),
+ 'ooyalaexternal:%s:%s:%s' % (cms, video_id, pcode),
'OoyalaExternal')