2014-02-22 06:36:04 -07:00
|
|
|
# coding: utf-8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class SaveFromIE(InfoExtractor):
|
|
|
|
IE_NAME = 'savefrom.net'
|
|
|
|
_VALID_URL = r'https?://[^.]+\.savefrom\.net/\#url=(?P<url>.*)$'
|
|
|
|
|
|
|
|
_TEST = {
|
|
|
|
'url': 'http://en.savefrom.net/#url=http://youtube.com/watch?v=UlVRAPW2WJY&utm_source=youtube.com&utm_medium=short_domains&utm_campaign=ssyoutube.com',
|
|
|
|
'info_dict': {
|
|
|
|
'id': 'UlVRAPW2WJY',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'About Team Radical MMA | MMA Fighting',
|
|
|
|
'upload_date': '20120816',
|
|
|
|
'uploader': 'Howcast',
|
|
|
|
'uploader_id': 'Howcast',
|
2017-01-02 05:08:07 -07:00
|
|
|
'description': r're:(?s).* Hi, my name is Rene Dreifuss\. And I\'m here to show you some MMA.*',
|
2014-02-22 06:36:04 -07:00
|
|
|
},
|
|
|
|
'params': {
|
|
|
|
'skip_download': True
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2021-08-18 19:41:24 -06:00
|
|
|
mobj = self._match_valid_url(url)
|
2014-02-22 06:36:04 -07:00
|
|
|
video_id = os.path.splitext(url.split('/')[-1])[0]
|
2019-01-01 09:56:05 -07:00
|
|
|
|
|
|
|
return self.url_result(mobj.group('url'), video_id=video_id)
|