mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-01 20:16:38 +02:00
[raiplay:live] Add extractor
This commit is contained in:
parent
23aec3d623
commit
449c665776
@ -824,6 +824,7 @@
|
|||||||
from .radiofrance import RadioFranceIE
|
from .radiofrance import RadioFranceIE
|
||||||
from .rai import (
|
from .rai import (
|
||||||
RaiPlayIE,
|
RaiPlayIE,
|
||||||
|
RaiPlayLiveIE,
|
||||||
RaiIE,
|
RaiIE,
|
||||||
)
|
)
|
||||||
from .rbmaradio import RBMARadioIE
|
from .rbmaradio import RBMARadioIE
|
||||||
|
@ -208,10 +208,27 @@ def _real_extract(self, url):
|
|||||||
}
|
}
|
||||||
|
|
||||||
info.update(relinker_info)
|
info.update(relinker_info)
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
||||||
|
class RaiPlayLiveIE(RaiBaseIE):
|
||||||
|
_VALID_URL = r'https?://(?:www\.)?raiplay\.it/dirette/(?P<id>\w*)'
|
||||||
|
_TEST = {
|
||||||
|
'url': 'http://www.raiplay.it/dirette/rai3',
|
||||||
|
'only_matching': True,
|
||||||
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
channel = self._match_id(url)
|
||||||
|
|
||||||
|
webpage = self._download_webpage(url, channel)
|
||||||
|
re_id = r'<div([^>]*)data-uniquename=(["\'])[\w-]*(?P<id>%s)(\2)([^>]*?)>' % RaiBaseIE._UUID_RE
|
||||||
|
video_id = self._html_search_regex(re_id, webpage, 'livestream-id', group='id')
|
||||||
|
|
||||||
|
return self.url_result('http://www.raiplay.it/dirette/ContentItem-%s.html' % video_id,
|
||||||
|
RaiPlayIE.ie_key(), video_id)
|
||||||
|
|
||||||
|
|
||||||
class RaiIE(RaiBaseIE):
|
class RaiIE(RaiBaseIE):
|
||||||
_VALID_URL = r'https?://[^/]+\.(?:rai\.(?:it|tv)|rainews\.it)/dl/.+?-(?P<id>%s)(?:-.+?)?\.html' % RaiBaseIE._UUID_RE
|
_VALID_URL = r'https?://[^/]+\.(?:rai\.(?:it|tv)|rainews\.it)/dl/.+?-(?P<id>%s)(?:-.+?)?\.html' % RaiBaseIE._UUID_RE
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
|
Loading…
Reference in New Issue
Block a user