]> gitweb @ CieloNegro.org - youtube-dl.git/blob - youtube_dl/extractor/engadget.py
[kaltura] sanitize embed URLs
[youtube-dl.git] / youtube_dl / extractor / engadget.py
1 from __future__ import unicode_literals
2
3 from .common import InfoExtractor
4
5
6 class EngadgetIE(InfoExtractor):
7     _VALID_URL = r'https?://(?:www\.)?engadget\.com/video/(?P<id>[^/?#]+)'
8
9     _TESTS = [{
10         # video with 5min ID
11         'url': 'http://www.engadget.com/video/518153925/',
12         'md5': 'c6820d4828a5064447a4d9fc73f312c9',
13         'info_dict': {
14             'id': '518153925',
15             'ext': 'mp4',
16             'title': 'Samsung Galaxy Tab Pro 8.4 Review',
17         },
18         'add_ie': ['FiveMin'],
19     }, {
20         # video with vidible ID
21         'url': 'https://www.engadget.com/video/57a28462134aa15a39f0421a/',
22         'only_matching': True,
23     }]
24
25     def _real_extract(self, url):
26         video_id = self._match_id(url)
27         return self.url_result('aol-video:%s' % video_id)