diff options
author | Elan Ruusamäe <glen@pld-linux.org> | 2019-01-01 18:56:05 +0200 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2019-01-01 23:56:05 +0700 |
commit | d226c560a6250d03ff5f27d5b078f894d448a0b4 (patch) | |
tree | d81cfb1ad4e3521f8fba2dd80bb02619695684c4 /youtube_dl/extractor/savefrom.py | |
parent | 8437f5089f2fac85a249c4368c2ea1415955d8b0 (diff) |
Refactor code to use url_result
Diffstat (limited to 'youtube_dl/extractor/savefrom.py')
-rw-r--r-- | youtube_dl/extractor/savefrom.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/youtube_dl/extractor/savefrom.py b/youtube_dl/extractor/savefrom.py index 30f9cf824..21e44b69a 100644 --- a/youtube_dl/extractor/savefrom.py +++ b/youtube_dl/extractor/savefrom.py @@ -30,8 +30,5 @@ class SaveFromIE(InfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = os.path.splitext(url.split('/')[-1])[0] - return { - '_type': 'url', - 'id': video_id, - 'url': mobj.group('url'), - } + + return self.url_result(mobj.group('url'), video_id=video_id) |