]>
Commit | Line | Data |
---|---|---|
41d3ec5f PH |
1 | # coding: utf-8 |
2 | from __future__ import unicode_literals | |
3 | ||
4 | import os.path | |
41d3ec5f PH |
5 | |
6 | from .common import InfoExtractor | |
7 | ||
8 | ||
9 | class SaveFromIE(InfoExtractor): | |
10 | IE_NAME = 'savefrom.net' | |
11 | _VALID_URL = r'https?://[^.]+\.savefrom\.net/\#url=(?P<url>.*)$' | |
12 | ||
13 | _TEST = { | |
14 | 'url': 'http://en.savefrom.net/#url=http://youtube.com/watch?v=UlVRAPW2WJY&utm_source=youtube.com&utm_medium=short_domains&utm_campaign=ssyoutube.com', | |
15 | 'info_dict': { | |
16 | 'id': 'UlVRAPW2WJY', | |
17 | 'ext': 'mp4', | |
18 | 'title': 'About Team Radical MMA | MMA Fighting', | |
19 | 'upload_date': '20120816', | |
20 | 'uploader': 'Howcast', | |
21 | 'uploader_id': 'Howcast', | |
ec85ded8 | 22 | 'description': r're:(?s).* Hi, my name is Rene Dreifuss\. And I\'m here to show you some MMA.*', |
41d3ec5f PH |
23 | }, |
24 | 'params': { | |
25 | 'skip_download': True | |
26 | } | |
27 | } | |
28 | ||
29 | def _real_extract(self, url): | |
5ad28e7f | 30 | mobj = self._match_valid_url(url) |
41d3ec5f | 31 | video_id = os.path.splitext(url.split('/')[-1])[0] |
d226c560 ER |
32 | |
33 | return self.url_result(mobj.group('url'), video_id=video_id) |