X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fmlb.py;h=bfdb462ebaf663df7d7c4f3c1618988f0aa1d1e3;hb=bd5650ac64fedd1c1ad7b90c4ec4ff5d4c053bc0;hp=c28be3a7d72a6bb88460c32ff42a8b34ff3e1d8e;hpb=199ece7eb83ffe7ba069b50080fe971df1db2d6c;p=youtube-dl.git diff --git a/youtube_dl/extractor/mlb.py b/youtube_dl/extractor/mlb.py index c28be3a7d..bfdb462eb 100644 --- a/youtube_dl/extractor/mlb.py +++ b/youtube_dl/extractor/mlb.py @@ -11,8 +11,22 @@ from ..utils import ( class MLBIE(InfoExtractor): - _VALID_URL = r'https?://m\.mlb\.com/video/(?:topic/[\da-z_-]+/)?v(?Pn?\d+)' + _VALID_URL = r'https?://m\.mlb\.com/(?:(?:.*?/)?video/(?:topic/[\da-z_-]+/)?v|shared/video/embed/embed\.html\?.*?\bcontent_id=)(?Pn?\d+)' _TESTS = [ + { + 'url': 'http://m.mlb.com/sea/video/topic/51231442/v34698933/nymsea-ackley-robs-a-home-run-with-an-amazing-catch/?c_id=sea', + 'md5': 'ff56a598c2cf411a9a38a69709e97079', + 'info_dict': { + 'id': '34698933', + 'ext': 'mp4', + 'title': "Ackley's spectacular catch", + 'description': 'md5:7f5a981eb4f3cbc8daf2aeffa2215bf0', + 'duration': 66, + 'timestamp': 1405980600, + 'upload_date': '20140721', + 'thumbnail': 're:^https?://.*\.jpg$', + }, + }, { 'url': 'http://m.mlb.com/video/topic/81536970/v34496663/mianym-stanton-practices-for-the-home-run-derby', 'md5': 'd9c022c10d21f849f49c05ae12a8a7e9', @@ -55,6 +69,10 @@ class MLBIE(InfoExtractor): 'thumbnail': 're:^https?://.*\.jpg$', }, }, + { + 'url': 'http://m.mlb.com/shared/video/embed/embed.html?content_id=35692085&topic_id=6479266&width=400&height=224&property=mlb', + 'only_matching': True, + }, ] def _real_extract(self, url):