mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-28 09:28:33 +00:00
Update dzsecurity.py
This commit is contained in:
parent
736f417e80
commit
1b2ae2ac04
@ -1,52 +1,50 @@
|
|||||||
|
|
||||||
from yt_dlp import traverse_obj
|
from .common import InfoExtractor
|
||||||
from yt_dlp.extractor.common import InfoExtractor
|
from ..utils import (
|
||||||
from yt_dlp.utils import smuggle_url, unsmuggle_url
|
smuggle_url,
|
||||||
|
unsmuggle_url,
|
||||||
|
)
|
||||||
|
from ..utils.traversal import traverse_obj
|
||||||
|
|
||||||
|
|
||||||
class DzsecurityLiveIE(InfoExtractor):
|
class DzsecurityLiveIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://live\.dzsecurity\.net/live/player/(?P<id>[\w-]+)'
|
_VALID_URL = r'https?://live\.dzsecurity\.net/live/player/(?P<id>[\w-]+)'
|
||||||
_EMBED_REGEX = [rf'<iframe [^>]*\bsrc\s*=\s*[\'"](?P<url>{_VALID_URL})']
|
_EMBED_REGEX = [rf'<iframe[^>]+\bsrc\s*=\s*["\'](?P<url>{_VALID_URL})']
|
||||||
|
|
||||||
_WEBPAGE_TESTS = [
|
_WEBPAGE_TESTS = [{
|
||||||
{
|
'url': 'https://www.echoroukonline.com/live',
|
||||||
'url': 'https://www.echoroukonline.com/live',
|
'info_dict': {
|
||||||
'info_dict': {
|
'id': 'echorouktv',
|
||||||
'id': 'echorouktv',
|
'title': r're:البث الحي لقناة الشروق تي في',
|
||||||
'title': r're:البث الحي لقناة الشروق تي في',
|
'ext': 'mp4',
|
||||||
'ext': 'mp4',
|
'live_status': 'is_live',
|
||||||
'live_status': 'is_live',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
}, {
|
||||||
'url': 'https://www.echoroukonline.com/live-news',
|
'url': 'https://www.echoroukonline.com/live-news',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'echorouknews',
|
'id': 'echorouknews',
|
||||||
'title': r're:البث الحي لقناة الشروق نيوز - آخر أخبار الجزائر',
|
'title': r're:البث الحي لقناة الشروق نيوز - آخر أخبار الجزائر',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
}, {
|
||||||
'url': 'https://elhayat.dz/%D8%A7%D9%84%D8%A8%D8%AB-%D8%A7%D9%84%D8%AD%D9%8A/',
|
'url': 'https://elhayat.dz/%D8%A7%D9%84%D8%A8%D8%AB-%D8%A7%D9%84%D8%AD%D9%8A/',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'elhayattv',
|
'id': 'elhayattv',
|
||||||
'title': r're:البث الحي - الحياة',
|
'title': r're:البث الحي - الحياة',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
}, {
|
||||||
'url': 'https://www.ennaharonline.com/live',
|
'url': 'https://www.ennaharonline.com/live',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'ennahartv',
|
'id': 'ennahartv',
|
||||||
'title': r're:البث الحي لقناة النهار – النهار أونلاين',
|
'title': r're:البث الحي لقناة النهار – النهار أونلاين',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
},
|
|
||||||
'skip': 'Geo-restricted to Algeria',
|
|
||||||
},
|
},
|
||||||
]
|
'skip': 'Geo-restricted to Algeria',
|
||||||
|
}]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _extract_embed_urls(cls, url, webpage):
|
def _extract_embed_urls(cls, url, webpage):
|
||||||
|
Loading…
Reference in New Issue
Block a user