Repository: yt-dlp/yt-dlp

Issue:
https://www.play.telecaribe.co/ support request
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2023.01.06** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that none of provided URLs [violate any copyrights](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required

### Region

Colombia

### Example URLs

- Entire series: https://www.play.telecaribe.co/breicok 
- Stream: https://www.play.telecaribe.co/live

### Provide a description that is worded well enough to be understood

There's no option to download a single episode

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', 'https://www.play.telecaribe.co/breicok']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd25] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-08-13-git-c469c3c3b1-full_build-www.gyan.dev (setts), ffprobe 2022-08-13-git-c469c3c3b1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1760 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
[generic] Extracting URL: https://www.play.telecaribe.co/breicok
[generic] breicok: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] breicok: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://www.play.telecaribe.co/breicok
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1502, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1578, in __extract_info
  File "yt_dlp\extractor\common.py", line 680, in extract
  File "yt_dlp\extractor\generic.py", line 2523, in _real_extract
yt_dlp.utils.UnsupportedError: Unsupported URL: https://www.play.telecaribe.co/breicok
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py
--- a/yt_dlp/extractor/_extractors.py
+++ b/yt_dlp/extractor/_extractors.py
@@ -1851,6 +1851,7 @@
 from .tele5 import Tele5IE
 from .tele13 import Tele13IE
 from .telebruxelles import TeleBruxellesIE
+from .telecaribe import TelecaribePlayIE
 from .telecinco import TelecincoIE
 from .telegraaf import TelegraafIE
 from .telegram import TelegramEmbedIE
diff --git a/yt_dlp/extractor/telecaribe.py b/yt_dlp/extractor/telecaribe.py
new file mode 100644
--- /dev/null
+++ b/yt_dlp/extractor/telecaribe.py
@@ -0,0 +1,77 @@
+import re
+
+from .common import InfoExtractor
+from ..utils import traverse_obj
+
+
+class TelecaribePlayIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?play\.telecaribe\.co/(?P<id>[\w-]+)'
+    _TESTS = [{
+        'url': 'https://www.play.telecaribe.co/breicok',
+        'info_dict': {
+            'id': 'breicok',
+            'title': 'Breicok',
+        },
+        'playlist_count': 7,
+    }, {
+        'url': 'https://www.play.telecaribe.co/si-fue-gol-de-yepes',
+        'info_dict': {
+            'id': 'si-fue-gol-de-yepes',
+            'title': 'Sí Fue Gol de Yepes',
+        },
+        'playlist_count': 6,
+    }, {
+        'url': 'https://www.play.telecaribe.co/ciudad-futura',
+        'info_dict': {
+            'id': 'ciudad-futura',
+            'title': 'Ciudad Futura',
+        },
+        'playlist_count': 10,
+    }, {
+        'url': 'https://www.play.telecaribe.co/live',
+        'info_dict': {
+            'id': 'live',
+            'title': r're:^Señal en vivo',
+            'live_status': 'is_live',
+            'ext': 'mp4',
+        },
+        'params': {
+            'skip_download': 'Livestream',
+        }
+    }]
+
+    def _download_player_webpage(self, webpage, display_id):
+        page_id = self._search_regex(
+            (r'window.firstPageId\s*=\s*["\']([^"\']+)', r'<div[^>]+id\s*=\s*"pageBackground_([^"]+)'),
+            webpage, 'page_id')
+
+        props = self._download_json(self._search_regex(
+            rf'<link[^>]+href\s*=\s*"([^"]+)"[^>]+id\s*=\s*"features_{page_id}"',
+            webpage, 'json_props_url'), display_id)['props']['render']['compProps']
+
+        return self._download_webpage(traverse_obj(props, (..., 'url'))[-1], display_id)
+
+    def _get_clean_title(self, title):
+        return re.sub(r'\s*\|\s*Telecaribe\s*VOD', '', title or '').strip() or None
+
+    def _real_extract(self, url):
+        display_id = self._match_id(url)
+        webpage = self._download_webpage(url, display_id)
+        player = self._download_player_webpage(webpage, display_id)
+
+        if display_id != 'live':
+            return self.playlist_from_matches(
+                re.findall(r'<a[^>]+href\s*=\s*"([^"]+\.mp4)', player), display_id,
+                self._get_clean_title(self._og_search_title(webpage)))
+
+        formats, subtitles = self._extract_m3u8_formats_and_subtitles(
+            self._search_regex(r'(?:let|const|var)\s+source\s*=\s*["\']([^"\']+)', player, 'm3u8 url'),
+            display_id, 'mp4')
+
+        return {
+            'id': display_id,
+            'title': self._get_clean_title(self._og_search_title(webpage)),
+            'formats': formats,
+            'subtitles': subtitles,
+            'is_live': True,
+        }


Test patch: