1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[ie/Canal1,CaracolTvPlay] Add extractors (#7151)

Closes #5826
Authored by: elyse0
This commit is contained in:
Elyse
2023-09-21 11:30:32 -06:00
committed by GitHub
parent 295fbb3ae3
commit b3febedbeb
4 changed files with 183 additions and 2 deletions

View File

@ -106,8 +106,12 @@ class MediaStreamIE(MediaStreamBaseIE):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
if 'Debido a tu ubicación no puedes ver el contenido' in webpage:
self.raise_geo_restricted()
for message in [
'Debido a tu ubicación no puedes ver el contenido',
'You are not allowed to watch this video: Geo Fencing Restriction'
]:
if message in webpage:
self.raise_geo_restricted()
player_config = self._search_json(r'window\.MDSTRM\.OPTIONS\s*=', webpage, 'metadata', video_id)