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