[13.cl] Add https://www.13.cl extractor

This commit is contained in:
Nicolas Dato 2023-11-26 19:51:35 -03:00
parent 00edf409b2
commit 10b2873382
2 changed files with 16 additions and 0 deletions

View File

@ -278,6 +278,7 @@ from .businessinsider import BusinessInsiderIE
from .bundesliga import BundesligaIE
from .buzzfeed import BuzzFeedIE
from .byutv import BYUtvIE
from .c13cl import C13ClIE
from .c56 import C56IE
from .cableav import CableAVIE
from .callin import CallinIE

15
yt_dlp/extractor/c13cl.py Normal file
View File

@ -0,0 +1,15 @@
from .common import InfoExtractor
from ..utils import js_to_json
from urllib.parse import urlencode
class C13ClIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?13\.cl/en-vivo'
def _real_extract(self, url):
display_id = 'C13'
webpage = self._download_webpage(url, display_id)
stream_url = self._search_regex(r'<div\s+.*id=(?:"|\')player(?:"|\')[^>]+><iframe\s+.*src=(?:"|\')([^?]+)', webpage, 'stream_url')
return self.url_result(stream_url,
display_id=display_id, url_transparent=True)