]>
Commit | Line | Data |
---|---|---|
933a5b37 JMF |
1 | from __future__ import unicode_literals |
2 | ||
933a5b37 | 3 | from .common import InfoExtractor |
933a5b37 JMF |
4 | |
5 | ||
6 | class FiveMinIE(InfoExtractor): | |
7 | IE_NAME = '5min' | |
08c65590 | 8 | _VALID_URL = r'(?:5min:|https?://(?:[^/]*?5min\.com/|delivery\.vidible\.tv/aol)(?:(?:Scripts/PlayerSeed\.js|playerseed/?)?\?.*?playList=)?)(?P<id>\d+)' |
933a5b37 | 9 | |
8f5c0218 JMF |
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', | |
2396062c | 19 | 'description': 'iPad mini with Retina Display review', |
26669ea3 | 20 | 'duration': 177, |
2396062c RA |
21 | 'uploader': 'engadget', |
22 | 'upload_date': '20131115', | |
23 | 'timestamp': 1384515288, | |
8f5c0218 | 24 | }, |
2396062c RA |
25 | 'params': { |
26 | # m3u8 download | |
27 | 'skip_download': True, | |
28 | } | |
933a5b37 | 29 | }, |
8f5c0218 JMF |
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', | |
26669ea3 | 38 | 'duration': 184, |
8f5c0218 | 39 | }, |
6d6536ac | 40 | 'skip': 'no longer available', |
8f5c0218 | 41 | }, |
2396062c RA |
42 | { |
43 | 'url': 'http://embed.5min.com/518726732/', | |
44 | 'only_matching': True, | |
26669ea3 | 45 | }, |
2396062c RA |
46 | { |
47 | 'url': 'http://delivery.vidible.tv/aol?playList=518013791', | |
48 | 'only_matching': True, | |
49 | } | |
50 | ] | |
933a5b37 | 51 | |
933a5b37 | 52 | def _real_extract(self, url): |
2396062c RA |
53 | video_id = self._match_id(url) |
54 | return self.url_result('aol-video:%s' % video_id) |