projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[extractor/common] Fix numeric identifiers conversion in DASH URL templates
[youtube-dl]
/
youtube_dl
/
extractor
/
rutv.py
diff --git
a/youtube_dl/extractor/rutv.py
b/youtube_dl/extractor/rutv.py
index d9df0686133a6772deb1e58260069857620afc58..a2379eb04c2e6744a49f315ebee2a0c9fb0170f6 100644
(file)
--- a/
youtube_dl/extractor/rutv.py
+++ b/
youtube_dl/extractor/rutv.py
@@
-14,7
+14,7
@@
class RUTVIE(InfoExtractor):
IE_DESC = 'RUTV.RU'
_VALID_URL = r'''(?x)
https?://player\.(?:rutv\.ru|vgtrk\.com)/
IE_DESC = 'RUTV.RU'
_VALID_URL = r'''(?x)
https?://player\.(?:rutv\.ru|vgtrk\.com)/
- (?P<path>flash
2
v/container\.swf\?id=
+ (?P<path>flash
\d+
v/container\.swf\?id=
|iframe/(?P<type>swf|video|live)/id/
|index/iframe/cast_id/)
(?P<id>\d+)'''
|iframe/(?P<type>swf|video|live)/id/
|index/iframe/cast_id/)
(?P<id>\d+)'''
@@
-109,7
+109,7
@@
class RUTVIE(InfoExtractor):
return mobj.group('url')
mobj = re.search(
return mobj.group('url')
mobj = re.search(
- r'<meta[^>]+?property=(["\'])og:video\1[^>]+?content=(["\'])(?P<url>https?://player\.(?:rutv\.ru|vgtrk\.com)/flash
2
v/container\.swf\?id=.+?\2)',
+ r'<meta[^>]+?property=(["\'])og:video\1[^>]+?content=(["\'])(?P<url>https?://player\.(?:rutv\.ru|vgtrk\.com)/flash
\d+
v/container\.swf\?id=.+?\2)',
webpage)
if mobj:
return mobj.group('url')
webpage)
if mobj:
return mobj.group('url')
@@
-119,7
+119,7
@@
class RUTVIE(InfoExtractor):
video_id = mobj.group('id')
video_path = mobj.group('path')
video_id = mobj.group('id')
video_path = mobj.group('path')
- if
video_path.startswith('flash2v'
):
+ if
re.match(r'flash\d+v', video_path
):
video_type = 'video'
elif video_path.startswith('iframe'):
video_type = mobj.group('type')
video_type = 'video'
elif video_path.startswith('iframe'):
video_type = mobj.group('type')
@@
-131,7
+131,7
@@
class RUTVIE(InfoExtractor):
is_live = video_type == 'live'
json_data = self._download_json(
is_live = video_type == 'live'
json_data = self._download_json(
- 'http://player.rutv.ru/iframe/
%splay/id/%s' % ('live-' if is_live else '
', video_id),
+ 'http://player.rutv.ru/iframe/
data%s/id/%s' % ('live' if is_live else 'video
', video_id),
video_id, 'Downloading JSON')
if json_data['errors']:
video_id, 'Downloading JSON')
if json_data['errors']:
@@
-168,7
+168,7
@@
class RUTVIE(InfoExtractor):
'play_path': mobj.group('playpath'),
'app': mobj.group('app'),
'page_url': 'http://player.rutv.ru',
'play_path': mobj.group('playpath'),
'app': mobj.group('app'),
'page_url': 'http://player.rutv.ru',
- 'player_url': 'http://player.rutv.ru/flash
2
v/osmf.swf?i=22',
+ 'player_url': 'http://player.rutv.ru/flash
3
v/osmf.swf?i=22',
'rtmp_live': True,
'ext': 'flv',
'vbr': int(quality),
'rtmp_live': True,
'ext': 'flv',
'vbr': int(quality),