mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-25 13:58:28 +00:00
Update easybroadcast.py
This commit is contained in:
parent
3f8470a7d2
commit
4ceff5da1b
@ -1,62 +1,57 @@
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import ExtractorError
|
from ..utils import ExtractorError
|
||||||
|
|
||||||
|
|
||||||
class EasyBroadcastLiveIE(InfoExtractor):
|
class EasyBroadcastLiveIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:\w+\.)?player\.easybroadcast\.io/events/(?P<id>[0-9a-zA-Z_]+)'
|
_VALID_URL = r'https?://(?:\w+\.)?player\.easybroadcast\.io/events/(?P<id>\w+)'
|
||||||
_EMBED_REGEX = [rf'<iframe [^>]*\bsrc=[\'"](?P<url>{_VALID_URL})']
|
_EMBED_REGEX = [rf'<iframe[^>]+\bsrc\s*=\s*["\'](?P<url>{_VALID_URL})']
|
||||||
_TESTS = [
|
_TESTS = [{
|
||||||
{
|
'url': 'https://al24.player.easybroadcast.io/events/66_al24_u4yga6h',
|
||||||
'url': 'https://al24.player.easybroadcast.io/events/66_al24_u4yga6h',
|
'info_dict': {
|
||||||
'info_dict': {
|
'id': '66_al24_u4yga6h',
|
||||||
'id': '66_al24_u4yga6h',
|
'title': str,
|
||||||
'title': r're:Al24 \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
|
'ext': 'mp4',
|
||||||
'ext': 'mp4',
|
'live_status': 'is_live',
|
||||||
'live_status': 'is_live',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
'nocheckcertificate': True,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
'params': {
|
||||||
'url': 'https://snrt.player.easybroadcast.io/events/73_aloula_w1dqfwm',
|
'nocheckcertificate': True,
|
||||||
'info_dict': {
|
|
||||||
'id': '73_aloula_w1dqfwm',
|
|
||||||
'title': r're:Aloula \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'live_status': 'is_live',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
'nocheckcertificate': True,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
]
|
}, {
|
||||||
_WEBPAGE_TESTS = [
|
'url': 'https://snrt.player.easybroadcast.io/events/73_aloula_w1dqfwm',
|
||||||
{
|
'info_dict': {
|
||||||
'url': 'https://al24news.dz/en/live',
|
'id': '73_aloula_w1dqfwm',
|
||||||
'info_dict': {
|
'title': str,
|
||||||
'id': '66_al24_u4yga6h',
|
'ext': 'mp4',
|
||||||
'title': r're:Al24 \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
|
'live_status': 'is_live',
|
||||||
'ext': 'mp4',
|
|
||||||
'live_status': 'is_live',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
'nocheckcertificate': True,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
'params': {
|
||||||
'url': 'https://snrtlive.ma/fr/al-aoula',
|
'nocheckcertificate': True,
|
||||||
'info_dict': {
|
|
||||||
'id': '73_aloula_w1dqfwm',
|
|
||||||
'title': r're:Aloula \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'live_status': 'is_live',
|
|
||||||
},
|
|
||||||
'params': {
|
|
||||||
'nocheckcertificate': True,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
]
|
}]
|
||||||
|
_WEBPAGE_TESTS = [{
|
||||||
|
'url': 'https://al24news.dz/en/live',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '66_al24_u4yga6h',
|
||||||
|
'title': str,
|
||||||
|
'ext': 'mp4',
|
||||||
|
'live_status': 'is_live',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'nocheckcertificate': True,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://snrtlive.ma/fr/al-aoula',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '73_aloula_w1dqfwm',
|
||||||
|
'title': str,
|
||||||
|
'ext': 'mp4',
|
||||||
|
'live_status': 'is_live',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'nocheckcertificate': True,
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
event_id = self._match_id(url)
|
event_id = self._match_id(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user