mirror of
https://source.netsyms.com/Mirrors/youtube-dl
synced 2024-11-11 01:10:35 +00:00
[rutv] Add support for testplayer.vgtrk.com (closes #13347)
This commit is contained in:
parent
28a4d6cce8
commit
624bd0104c
@ -13,11 +13,15 @@ from ..utils import (
|
|||||||
class RUTVIE(InfoExtractor):
|
class RUTVIE(InfoExtractor):
|
||||||
IE_DESC = 'RUTV.RU'
|
IE_DESC = 'RUTV.RU'
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://player\.(?:rutv\.ru|vgtrk\.com)/
|
https?://
|
||||||
(?P<path>flash\d+v/container\.swf\?id=
|
(?:test)?player\.(?:rutv\.ru|vgtrk\.com)/
|
||||||
|iframe/(?P<type>swf|video|live)/id/
|
(?P<path>
|
||||||
|index/iframe/cast_id/)
|
flash\d+v/container\.swf\?id=|
|
||||||
(?P<id>\d+)'''
|
iframe/(?P<type>swf|video|live)/id/|
|
||||||
|
index/iframe/cast_id/
|
||||||
|
)
|
||||||
|
(?P<id>\d+)
|
||||||
|
'''
|
||||||
|
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
@ -99,17 +103,21 @@ class RUTVIE(InfoExtractor):
|
|||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'url': 'https://testplayer.vgtrk.com/iframe/live/id/19201/showZoomBtn/false/isPlay/true/',
|
||||||
|
'only_matching': True,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _extract_url(cls, webpage):
|
def _extract_url(cls, webpage):
|
||||||
mobj = re.search(
|
mobj = re.search(
|
||||||
r'<iframe[^>]+?src=(["\'])(?P<url>https?://player\.(?:rutv\.ru|vgtrk\.com)/(?:iframe/(?:swf|video|live)/id|index/iframe/cast_id)/.+?)\1', webpage)
|
r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:test)?player\.(?:rutv\.ru|vgtrk\.com)/(?:iframe/(?:swf|video|live)/id|index/iframe/cast_id)/.+?)\1', webpage)
|
||||||
if mobj:
|
if mobj:
|
||||||
return mobj.group('url')
|
return mobj.group('url')
|
||||||
|
|
||||||
mobj = re.search(
|
mobj = re.search(
|
||||||
r'<meta[^>]+?property=(["\'])og:video\1[^>]+?content=(["\'])(?P<url>https?://player\.(?:rutv\.ru|vgtrk\.com)/flash\d+v/container\.swf\?id=.+?\2)',
|
r'<meta[^>]+?property=(["\'])og:video\1[^>]+?content=(["\'])(?P<url>https?://(?:test)?player\.(?:rutv\.ru|vgtrk\.com)/flash\d+v/container\.swf\?id=.+?\2)',
|
||||||
webpage)
|
webpage)
|
||||||
if mobj:
|
if mobj:
|
||||||
return mobj.group('url')
|
return mobj.group('url')
|
||||||
|
Loading…
Reference in New Issue
Block a user