Repository: yt-dlp/yt-dlp

Issue:
Telecaribeplus livestream
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I'm running yt-dlp version **2023.03.04** ([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 searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and 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 I'm willing to share it if required

### Region

Colombia

### Example URLs

https://www.play.telecaribe.co/liveplus

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

The site recently added the possibility of stream the plus version of the channel wich is not currently supported by yt-dlp

### 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] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [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/liveplus']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.03.16.195558 [216bcb66d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg n6.0-7-gadb4688bfb-20230316 (setts), ffprobe n6.0-7-gadb4688bfb-20230316
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1788 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version: nightly@2023.03.21.231235, Current version: nightly@2023.03.16.195558
Current Build Hash: f2d91d50f78f402321f3ecaaf951d67c23d7b40324a3192ff3a0486c2c1f7aa7
[debug] Downloading _update_spec from https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/_update_spec
Updating to nightly@2023.03.21.231235 ...
[debug] Downloading yt-dlp.exe from https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.exe
[debug] Downloading SHA2-256SUMS from https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/SHA2-256SUMS
Updated yt-dlp to nightly@2023.03.21.231235
[debug] Restarting: yt-dlp -vU "https://www.play.telecaribe.co/liveplus"
[debug] Command-line config: ['-vU', 'https://www.play.telecaribe.co/liveplus']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.03.21.231235 [c2e0fc40a] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg n6.0-7-gadb4688bfb-20230316 (setts), ffprobe n6.0-7-gadb4688bfb-20230316
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1788 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version: nightly@2023.03.21.231235, Current version: nightly@2023.03.21.231235
Current Build Hash: 6dcf55afd207aa945cb97a2e435f42518808874992ef3f87e197b127d6e7736d
yt-dlp is up to date (nightly@2023.03.21.231235)
[TelecaribePlay] Extracting URL: https://www.play.telecaribe.co/liveplus
[TelecaribePlay] liveplus: Downloading webpage
[TelecaribePlay] liveplus: Downloading JSON metadata
[TelecaribePlay] liveplus: Downloading webpage
[download] Downloading playlist: Señal en vivo Plus
[TelecaribePlay] Playlist Señal en vivo Plus: Downloading 0 items of 0
[download] Finished downloading playlist: Señal en vivo Plus
```



Discussion:
@denaunistic are you able to load/play this URL?
```
https://tkx.apis.anvato.net/rest/v2/mcp/video/adstrJ4lqmk8VOz0?anvack=QMl6NLXvHRjEMnuMa2jVcbwPdOcjYw0z&eud=3ycd7nhfPYkQpMXloO%2BHT1QbBonb6MJjT0hVNjOaZzoZc58sLfI%2Blh65SHeDLEPB7irJPqfm6Ht8BUvgSOXEbg%3D%3D
```
I get an API error; it may be because I'm geo-blocked.
But if the above link works for you, then I think this is the only change needed to be made to the extractor:
```diff
diff --git a/yt_dlp/extractor/telecaribe.py b/yt_dlp/extractor/telecaribe.py
index b6d88a809..e6c2d5857 100644
--- a/yt_dlp/extractor/telecaribe.py
+++ b/yt_dlp/extractor/telecaribe.py
@@ -59,7 +59,7 @@ def _real_extract(self, url):
         webpage = self._download_webpage(url, display_id)
         player = self._download_player_webpage(webpage, display_id)
 
-        if display_id != 'live':
+        if display_id not in ('live', 'liveplus'):
             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)))
```
>  are you able to load/play this URL?

when i open the url it downloads a m3u8 file wich can be opened in vlc

Resolving patch:
diff --git a/yt_dlp/extractor/telecaribe.py b/yt_dlp/extractor/telecaribe.py
--- a/yt_dlp/extractor/telecaribe.py
+++ b/yt_dlp/extractor/telecaribe.py
@@ -38,11 +38,23 @@ class TelecaribePlayIE(InfoExtractor):
         'params': {
             'skip_download': 'Livestream',
         }
+    }, {
+        'url': 'https://www.play.telecaribe.co/liveplus',
+        'info_dict': {
+            'id': 'liveplus',
+            'title': r're:^Señal en vivo Plus',
+            'live_status': 'is_live',
+            'ext': 'mp4',
+        },
+        'params': {
+            'skip_download': 'Livestream',
+        },
+        'skip': 'Geo-restricted to Colombia',
     }]
 
     def _download_player_webpage(self, webpage, display_id):
         page_id = self._search_regex(
-            (r'window.firstPageId\s*=\s*["\']([^"\']+)', r'<div[^>]+id\s*=\s*"pageBackground_([^"]+)'),
+            (r'window\.firstPageId\s*=\s*["\']([^"\']+)', r'<div[^>]+id\s*=\s*"pageBackground_([^"]+)'),
             webpage, 'page_id')
 
         props = self._download_json(self._search_regex(
@@ -59,14 +71,16 @@ def _real_extract(self, url):
         webpage = self._download_webpage(url, display_id)
         player = self._download_player_webpage(webpage, display_id)
 
-        if display_id != 'live':
+        livestream_url = self._search_regex(
+            r'(?:let|const|var)\s+source\s*=\s*["\']([^"\']+)', player, 'm3u8 url', default=None)
+
+        if not livestream_url:
             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')
+            livestream_url, display_id, 'mp4', live=True)
 
         return {
             'id': display_id,


Test patch: