Repository: yt-dlp/yt-dlp

Issue:
Download from ntv.ru stop working
### 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 reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2023.10.13** ([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 [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 am willing to share it if required

### Region

Russia

### Example URLs

- Single video: https://www.ntv.ru/peredacha/main_road/m22901/o743965


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

It worked on 30.09.2023 and on 01.10.2023. But It isn't working since 14.10.2023

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] 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
yt-dlp -vU https://www.ntv.ru/peredacha/main_road/m22901/o743965
[debug] Command-line config: ['-vU', 'https://www.ntv.ru/peredacha/main_road/m22901/o743965']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.10.13 [b634ba742] (pip)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-5.15.0-86-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2020.06.20, mutagen-1.45.1, secretstorage-3.3.1, sqlite3-3.37.2, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1890 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.10.13, Current version: stable@2023.10.13
yt-dlp is up to date (stable@2023.10.13)
[ntv.ru] Extracting URL: https://www.ntv.ru/peredacha/main_road/m22901/o743965
[ntv.ru] o743965: Downloading webpage
ERROR: [ntv.ru] o743965: 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
  File "/home/dimon/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 715, in extract
    ie_result = self._real_extract(url)
  File "/home/dimon/.local/lib/python3.10/site-packages/yt_dlp/extractor/ntvru.py", line 99, in _real_extract
    video_id = self._html_search_regex(
  File "/home/dimon/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1299, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/home/dimon/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1263, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
```



Discussion:
```diff
--- old/yt-dlp/yt_dlp/extractor/ntvru.py
+++ new/yt-dlp/yt_dlp/extractor/ntvru.py
@@ -78,7 +78,8 @@
     }]
 
     _VIDEO_ID_REGEXES = [
-        r'<meta property="og:url" content="http://www\.ntv\.ru/video/(\d+)',
+        r'<meta property="og:url" content="https?://www\.ntv\.ru/video/(\d+)',
+        r'<meta property="og:video:(?:url|iframe)" content="https?://www\.ntv\.ru/embed/(\d+)',
         r'<video embed=[^>]+><id>(\d+)</id>',
         r'<video restriction[^>]+><key>(\d+)</key>',
     ]
```
**ntv.ru** still doesn't work.
updated to the latest nightly version (windows) and tried both link types for the same video:
https://www.ntv.ru/peredacha/sledstvie/m101461/o755220
https://www.ntv.ru/video/2307542

```
o:\work\ydl>yt-dlp.exe -vU -F https://www.ntv.ru/peredacha/sledstvie/m101461/o755220
[debug] Command-line config: ['-vU', '-F', 'https://www.ntv.ru/peredacha/sledstvie/m101461/o755220']
[debug] Encodings: locale cp1251, fs utf-8, pref cp1251, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version nightly@2024.02.22.232849 from yt-dlp/yt-dlp-nightly-builds [55f183337] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-2012ServerR2-6.3.9600-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-04-21-git-83e1a1de88-full_build-www.gyan.dev (setts), ffprobe 2022-04-21-git-83e1a1de88-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1834 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.02.22.232849 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.02.22.232849 from yt-dlp/yt-dlp-nightly-builds)
[ntv.ru] Extracting URL: https://www.ntv.ru/peredacha/sledstvie/m101461/o755220
[ntv.ru] o755220: Downloading webpage
ERROR: [ntv.ru] o755220: 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
  File "yt_dlp\extractor\common.py", line 732, in extract
  File "yt_dlp\extractor\ntvru.py", line 99, in _real_extract
  File "yt_dlp\extractor\common.py", line 1316, in _html_search_regex
  File "yt_dlp\extractor\common.py", line 1280, in _search_regex

o:\work\ydl>yt-dlp.exe -vU -F https://www.ntv.ru/video/2307542
[debug] Command-line config: ['-vU', '-F', 'https://www.ntv.ru/video/2307542']
[debug] Encodings: locale cp1251, fs utf-8, pref cp1251, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version nightly@2024.02.22.232849 from yt-dlp/yt-dlp-nightly-builds [55f183337] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-2012ServerR2-6.3.9600-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-04-21-git-83e1a1de88-full_build-www.gyan.dev (setts), ffprobe 2022-04-21-git-83e1a1de88-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1834 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.02.22.232849 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.02.22.232849 from yt-dlp/yt-dlp-nightly-builds)
[ntv.ru] Extracting URL: https://www.ntv.ru/video/2307542
[ntv.ru] 2307542: Downloading webpage
ERROR: [ntv.ru] 2307542: 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
  File "yt_dlp\extractor\common.py", line 732, in extract
  File "yt_dlp\extractor\ntvru.py", line 99, in _real_extract
  File "yt_dlp\extractor\common.py", line 1316, in _html_search_regex
  File "yt_dlp\extractor\common.py", line 1280, in _search_regex
```

tried to use the above fix by editing **"ntvru.py"** and placing into **"yt_dlp_plugins\extractor\"** - the error remains the same.

the video stream is OK and being downloaded flawlessly via direct mpd-link, provided by _"stream detector"_ browser extention:

```
o:\work\ydl>yt-dlp.exe https://cdn-vod.ntv.ru/promo/packager/ts/1708785707/md5/GoAOPxQkfDWwYubf4HHC3g/02/30/75/2307542/01101749_hd_hqAiZCR6LW7dnIYxgk/h264.mpd -o NTV.mp4
[generic] Extracting URL: https://cdn-vod.ntv.ru/promo/packager/ts/1708785707/md5/GoAOPxQkfDWwYubf4HHC3g/02/30/75/2307542/0...6LW7dnIYxgk/h264.mpd
[generic] h264: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] h264: Extracting information
[info] h264: Downloading 1 format(s): 4+1
[download] Destination: NTV.f4.mp4
[download] 100% of  963.07MiB in 00:10:51 at 1.48MiB/s
[download] Destination: NTV.f1.m4a
[download] 100% of   40.93MiB in 00:00:21 at 1.94MiB/s
[Merger] Merging formats into "NTV.mp4"
Deleting original file NTV.f1.m4a (pass -k to keep)
Deleting original file NTV.f4.mp4 (pass -k to keep)
```

Resolving patch:
diff --git a/yt_dlp/extractor/ntvru.py b/yt_dlp/extractor/ntvru.py
--- a/yt_dlp/extractor/ntvru.py
+++ b/yt_dlp/extractor/ntvru.py
@@ -35,6 +35,7 @@ class NTVRuIE(InfoExtractor):
             'duration': 172,
             'view_count': int,
         },
+        'skip': '404 Not Found',
     }, {
         'url': 'http://www.ntv.ru/peredacha/segodnya/m23700/o232416',
         'md5': '82dbd49b38e3af1d00df16acbeab260c',
@@ -78,7 +79,8 @@ class NTVRuIE(InfoExtractor):
     }]
 
     _VIDEO_ID_REGEXES = [
-        r'<meta property="og:url" content="http://www\.ntv\.ru/video/(\d+)',
+        r'<meta property="og:url" content="https?://www\.ntv\.ru/video/(\d+)',
+        r'<meta property="og:video:(?:url|iframe)" content="https?://www\.ntv\.ru/embed/(\d+)',
         r'<video embed=[^>]+><id>(\d+)</id>',
         r'<video restriction[^>]+><key>(\d+)</key>',
     ]


Test patch: