diff options
author | Sergey M․ <[email protected]> | 2014-03-30 15:35:07 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2014-03-30 15:35:07 +0700 |
commit | c72477bd322da671cb55cffce10fb2135fa94b1d (patch) | |
tree | 0724bd7141861fc3cfa38805fb1b30a83ae5aebc | |
parent | 9a7b072e38ac6aafc346692a268e7a399a07c607 (diff) | |
download | youtube-dl-c72477bd322da671cb55cffce10fb2135fa94b1d.tar.gz youtube-dl-c72477bd322da671cb55cffce10fb2135fa94b1d.zip |
[rutube] Modernize
-rw-r--r-- | youtube_dl/extractor/rutube.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/youtube_dl/extractor/rutube.py b/youtube_dl/extractor/rutube.py index 4922dd764..7c6607460 100644 --- a/youtube_dl/extractor/rutube.py +++ b/youtube_dl/extractor/rutube.py @@ -20,8 +20,9 @@ class RutubeIE(InfoExtractor): _TEST = { 'url': 'http://rutube.ru/video/3eac3b4561676c17df9132a9a1e62e3e/', - 'file': '3eac3b4561676c17df9132a9a1e62e3e.mp4', 'info_dict': { + 'id': '3eac3b4561676c17df9132a9a1e62e3e', + 'ext': 'mp4', 'title': 'Раненный кенгуру забежал в аптеку', 'description': 'http://www.ntdtv.ru ', 'duration': 80, @@ -39,12 +40,14 @@ class RutubeIE(InfoExtractor): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') - api_response = self._download_webpage('http://rutube.ru/api/video/%s/?format=json' % video_id, - video_id, 'Downloading video JSON') + api_response = self._download_webpage( + 'http://rutube.ru/api/video/%s/?format=json' % video_id, + video_id, 'Downloading video JSON') video = json.loads(api_response) - api_response = self._download_webpage('http://rutube.ru/api/play/trackinfo/%s/?format=json' % video_id, - video_id, 'Downloading trackinfo JSON') + api_response = self._download_webpage( + 'http://rutube.ru/api/play/trackinfo/%s/?format=json' % video_id, + video_id, 'Downloading trackinfo JSON') trackinfo = json.loads(api_response) # Some videos don't have the author field |