Repository: yt-dlp/yt-dlp

Issue:
Broken MallTV aka Mall.tv
### 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 broken site
- [X] I've verified that I'm running yt-dlp version **2022.09.01** ([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 all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [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 I'm willing to share it if required

### Region

Czech Republic (should not be restricted)

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

site URL is www.mall.tv >>> https://www.mall.tv

I have tried e.g.:

yt-dlp https://www.mall.tv/zivoty-slavnych/nadeje-vychodu-i-zapadu-jak-michail-gorbacov-zmenil-politickou-mapu-sveta-a-ziskal-za-to-nobelovu-cenu-miru


My-iMac:~ iMac$ yt-dlp https://www.mall.tv/zivoty-slavnych/nadeje-vychodu-i-zapadu-jak-michail-gorbacov-zmenil-politickou-mapu-sveta-a-ziskal-za-to-nobelovu-cenu-miru
[MallTV] nadeje-vychodu-i-zapadu-jak-michail-gorbacov-zmenil-politickou-mapu-sveta-a-ziskal-za-to-nobelovu-cenu-miru: Downloading webpage
ERROR: [MallTV] nadeje-vychodu-i-zapadu-jak-michail-gorbacov-zmenil-politickou-mapu-sveta-a-ziskal-za-to-nobelovu-cenu-miru: Unable to extract video id; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
My-iMac:~ iMac$ 

My-iMac:~ iMac$ yt-dlp --version
2022.09.01
My-iMac:~ iMac$ 


### 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
My-iMac:~ iMac$ yt-dlp -vU
[debug] Command-line config: ['-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.09.01 [5d7c7d6] (pip)
[debug] Python 3.10.6 (CPython 64bit) - macOS-11.6-x86_64-i386-64bit 
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1670 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.09.01, Current version: 2022.09.01
yt-dlp is up to date (2022.09.01)
My-iMac:~ iMac$
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/malltv.py b/yt_dlp/extractor/malltv.py
--- a/yt_dlp/extractor/malltv.py
+++ b/yt_dlp/extractor/malltv.py
@@ -14,7 +14,7 @@ class MallTVIE(InfoExtractor):
     _VALID_URL = r'https?://(?:(?:www|sk)\.)?mall\.tv/(?:[^/]+/)*(?P<id>[^/?#&]+)'
     _TESTS = [{
         'url': 'https://www.mall.tv/18-miliard-pro-neziskovky-opravdu-jsou-sportovci-nebo-clovek-v-tisni-pijavice',
-        'md5': '1c4a37f080e1f3023103a7b43458e518',
+        'md5': 'cd69ce29176f6533b65bff69ed9a5f2a',
         'info_dict': {
             'id': 't0zzt0',
             'display_id': '18-miliard-pro-neziskovky-opravdu-jsou-sportovci-nebo-clovek-v-tisni-pijavice',
@@ -25,6 +25,11 @@ class MallTVIE(InfoExtractor):
             'timestamp': 1538870400,
             'upload_date': '20181007',
             'view_count': int,
+            'comment_count': int,
+            'thumbnail': 'https://cdn.vpplayer.tech/agmipnzv/encode/vjsnigfq/thumbnails/retina.jpg',
+            'average_rating': 9.060869565217391,
+            'dislike_count': int,
+            'like_count': int,
         }
     }, {
         'url': 'https://www.mall.tv/kdo-to-plati/18-miliard-pro-neziskovky-opravdu-jsou-sportovci-nebo-clovek-v-tisni-pijavice',
@@ -32,6 +37,24 @@ class MallTVIE(InfoExtractor):
     }, {
         'url': 'https://sk.mall.tv/gejmhaus/reklamacia-nehreje-vyrobnik-tepla-alebo-spekacka',
         'only_matching': True,
+    }, {
+        'url': 'https://www.mall.tv/zivoty-slavnych/nadeje-vychodu-i-zapadu-jak-michail-gorbacov-zmenil-politickou-mapu-sveta-a-ziskal-za-to-nobelovu-cenu-miru',
+        'info_dict': {
+            'id': 'yx010y',
+            'ext': 'mp4',
+            'dislike_count': int,
+            'description': 'md5:aee02bee5a8d072c6a8207b91d1905a9',
+            'thumbnail': 'https://cdn.vpplayer.tech/agmipnzv/encode/vjsnjdeu/thumbnails/retina.jpg',
+            'comment_count': int,
+            'display_id': 'md5:0ec2afa94d2e2b7091c019cef2a43a9b',
+            'like_count': int,
+            'duration': 752,
+            'timestamp': 1646956800,
+            'title': 'md5:fe79385daaf16d74c12c1ec4a26687af',
+            'view_count': int,
+            'upload_date': '20220311',
+            'average_rating': 9.685714285714285,
+        }
     }]
 
     def _real_extract(self, url):
@@ -43,12 +66,12 @@ def _real_extract(self, url):
         video = self._parse_json(self._search_regex(
             r'videoObject\s*=\s*JSON\.parse\(JSON\.stringify\(({.+?})\)\);',
             webpage, 'video object'), display_id)
-        video_source = video['VideoSource']
+
         video_id = self._search_regex(
-            r'/([\da-z]+)/index\b', video_source, 'video id')
+            r'<input\s*id\s*=\s*player-id-name\s*[^>]+value\s*=\s*(\w+)', webpage, 'video id')
 
         formats = self._extract_m3u8_formats(
-            video_source + '.m3u8', video_id, 'mp4', 'm3u8_native')
+            video['VideoSource'], video_id, 'mp4', 'm3u8_native')
         self._sort_formats(formats)
 
         subtitles = {}
@@ -69,7 +92,7 @@ def get_count(k):
         info = self._search_json_ld(webpage, video_id, default={})
 
         return merge_dicts({
-            'id': video_id,
+            'id': str(video_id),
             'display_id': display_id,
             'title': video.get('Title'),
             'description': clean_html(video.get('Description')),


Test patch: