- ]
-
- def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
-
- detail = self._download_xml(
- 'http://m.mlb.com/gen/multimedia/detail/%s/%s/%s/%s.xml'
- % (video_id[-3], video_id[-2], video_id[-1], video_id), video_id)
-
- title = detail.find('./headline').text
- description = detail.find('./big-blurb').text
- duration = parse_duration(detail.find('./duration').text)
- timestamp = parse_iso8601(detail.attrib['date'][:-5])
-
- thumbnails = [{
- 'url': thumbnail.text,
- } for thumbnail in detail.findall('./thumbnailScenarios/thumbnailScenario')]
-
- formats = []
- for media_url in detail.findall('./url'):
- playback_scenario = media_url.attrib['playback_scenario']
- fmt = {
- 'url': media_url.text,
- 'format_id': playback_scenario,
- }
- m = re.search(r'(?P<vbr>\d+)K_(?P<width>\d+)X(?P<height>\d+)', playback_scenario)
- if m:
- fmt.update({
- 'vbr': int(m.group('vbr')) * 1000,
- 'width': int(m.group('width')),
- 'height': int(m.group('height')),
- })
- formats.append(fmt)
-
- self._sort_formats(formats)
-
- return {
- 'id': video_id,
- 'title': title,
- 'description': description,
- 'duration': duration,
- 'timestamp': timestamp,
- 'formats': formats,
- 'thumbnails': thumbnails,
+ {
+ 'url': 'http://mlb.mlb.com/shared/video/embed/embed.html?content_id=36599553',
+ 'only_matching': True,
+ },
+ {
+ 'url': 'http://mlb.mlb.com/es/video/play.jsp?content_id=36599553',
+ 'only_matching': True,
+ },
+ {
+ 'url': 'https://www.mlb.com/cardinals/video/piscottys-great-sliding-catch/c-51175783',
+ 'only_matching': True,
+ },
+ {
+ # From http://m.mlb.com/news/article/118550098/blue-jays-kevin-pillar-goes-spidey-up-the-wall-to-rob-tim-beckham-of-a-homer
+ 'url': 'http://mlb.mlb.com/shared/video/embed/m-internal-embed.html?content_id=75609783&property=mlb&autoplay=true&hashmode=false&siteSection=mlb/multimedia/article_118550098/article_embed&club=mlb',
+ 'only_matching': True,
+ },
+ {
+ 'url': 'https://www.mlb.com/cut4/carlos-gomez-borrowed-sunglasses-from-an-as-fan/c-278912842',
+ 'only_matching': True,