projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a7b072
)
[rutube] Modernize
author
Sergey M․
<dstftw@gmail.com>
Sun, 30 Mar 2014 08:35:07 +0000
(15:35 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 30 Mar 2014 08:35:07 +0000
(15:35 +0700)
youtube_dl/extractor/rutube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/rutube.py
b/youtube_dl/extractor/rutube.py
index 4922dd764eb119a4993bad607a3a01afccf99f51..7c66074602521aea74f31da096be2c86a8281de8 100644
(file)
--- 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/',
_TEST = {
'url': 'http://rutube.ru/video/3eac3b4561676c17df9132a9a1e62e3e/',
- 'file': '3eac3b4561676c17df9132a9a1e62e3e.mp4',
'info_dict': {
'info_dict': {
+ 'id': '3eac3b4561676c17df9132a9a1e62e3e',
+ 'ext': 'mp4',
'title': 'Раненный кенгуру забежал в аптеку',
'description': 'http://www.ntdtv.ru ',
'duration': 80,
'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')
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)
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
trackinfo = json.loads(api_response)
# Some videos don't have the author field