]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/fivemin.py
New upstream version 2017.05.18.1
[youtubedl] / youtube_dl / extractor / fivemin.py
1 from __future__ import unicode_literals
2
3 from .common import InfoExtractor
4
5
6 class FiveMinIE(InfoExtractor):
7 IE_NAME = '5min'
8 _VALID_URL = r'(?:5min:|https?://(?:[^/]*?5min\.com/|delivery\.vidible\.tv/aol)(?:(?:Scripts/PlayerSeed\.js|playerseed/?)?\?.*?playList=)?)(?P<id>\d+)'
9
10 _TESTS = [
11 {
12 # From http://www.engadget.com/2013/11/15/ipad-mini-retina-display-review/
13 'url': 'http://pshared.5min.com/Scripts/PlayerSeed.js?sid=281&width=560&height=345&playList=518013791',
14 'md5': '4f7b0b79bf1a470e5004f7112385941d',
15 'info_dict': {
16 'id': '518013791',
17 'ext': 'mp4',
18 'title': 'iPad Mini with Retina Display Review',
19 'description': 'iPad mini with Retina Display review',
20 'duration': 177,
21 'uploader': 'engadget',
22 'upload_date': '20131115',
23 'timestamp': 1384515288,
24 },
25 'params': {
26 # m3u8 download
27 'skip_download': True,
28 }
29 },
30 {
31 # From http://on.aol.com/video/how-to-make-a-next-level-fruit-salad-518086247
32 'url': '5min:518086247',
33 'md5': 'e539a9dd682c288ef5a498898009f69e',
34 'info_dict': {
35 'id': '518086247',
36 'ext': 'mp4',
37 'title': 'How to Make a Next-Level Fruit Salad',
38 'duration': 184,
39 },
40 'skip': 'no longer available',
41 },
42 {
43 'url': 'http://embed.5min.com/518726732/',
44 'only_matching': True,
45 },
46 {
47 'url': 'http://delivery.vidible.tv/aol?playList=518013791',
48 'only_matching': True,
49 }
50 ]
51
52 def _real_extract(self, url):
53 video_id = self._match_id(url)
54 return self.url_result('aol-video:%s' % video_id)