Repository: yt-dlp/yt-dlp

Issue:
RaiPlay Extractor now returning 403: Forbidden
### 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 that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [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 [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

Italy

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

The RAI extractor was working as of at least a couple of days ago, but appears to have broken and returns 403: Forbidden for every stream.  I am still able to get a 720p format by inputting the M3U8 or JSON manually, so I think the URL linking or something has changed and it can't parse it any more.  I can't find the 1080p `https-5000` format in the M3U8 or JSON, but it shows up with doing `--list-formats` so it should still be there.

I've tested this on a bunch of videos that worked before, and they're all broken now, so it seems this change is site-wide.  You previously didn't need to be logged in for the extractor to work, but I tested being logged out and logged in and both give the same error, so that's not the problem.

@nixxo has previously fixed this extractor in the past, so hopefully they can look at it again.

### 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.exe -vU https://www.raiplay.it/programmi/solecuoreamore
[debug] Command-line config: ['-vU', 'https://www.raiplay.it/programmi/solecuoreamore']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.12.30 from yt-dlp/yt-dlp [f10589e34] (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 N-109444-geef763c705-20221222 (setts), ffprobe N-109444-geef763c705-20221222, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.19.1, brotli-1.1.0, certifi-2023.11.17, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.1.0, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1798 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2023.12.30 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2023.12.30 from yt-dlp/yt-dlp)
[RaiPlayPlaylist] Extracting URL: https://www.raiplay.it/programmi/solecuoreamore
[RaiPlayPlaylist] solecuoreamore: Downloading program JSON
[RaiPlayPlaylist] ContentSet-da756fb7-0eb0-4c58-95fe-d0e49440d8a6: Downloading content set JSON
[download] Downloading playlist: Sole Cuore Amore
[RaiPlayPlaylist] Playlist Sole Cuore Amore: Downloading 1 items of 1
[download] Downloading item 1 of 1
[RaiPlay] Extracting URL: https://www.raiplay.it/video/2019/08/Sole-Cuore-Amore-20ea42ca-d856-44de-8eac-05ecddd67192.json
[RaiPlay] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading video JSON
[RaiPlay] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading XML metadata
[RaiPlay] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading m3u8 information
[debug] [RaiPlay] Creating https format for quality 1200
[debug] [RaiPlay] Creating https format for quality 1800
[debug] [RaiPlay] Creating https format for quality 2400
[debug] [RaiPlay] Creating https format for quality 3600
[debug] [RaiPlay] Creating https format for quality 5000
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading 1 format(s): https-5000
[debug] Invoking http downloader on "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=8Pz8oQnrQmQ5NsuDPtWg9weeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-5000"
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 4082, in urlopen
  File "yt_dlp\networking\common.py", line 114, in send
  File "yt_dlp\networking\_helper.py", line 204, in wrapper
  File "yt_dlp\networking\common.py", line 325, in send
  File "yt_dlp\networking\_requests.py", line 343, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3418, in process_info
  File "yt_dlp\YoutubeDL.py", line 3139, in dl
  File "yt_dlp\downloader\common.py", line 455, in download
  File "yt_dlp\downloader\http.py", line 364, in real_download
  File "yt_dlp\downloader\http.py", line 120, in establish_connection
  File "yt_dlp\YoutubeDL.py", line 4114, in urlopen
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden

[download] Finished downloading playlist: Sole Cuore Amore
```

RaiPlay Extractor now returning 403: Forbidden
### 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 that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [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 [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

Italy

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

The RAI extractor was working as of at least a couple of days ago, but appears to have broken and returns 403: Forbidden for every stream.  I am still able to get a 720p format by inputting the M3U8 or JSON manually, so I think the URL linking or something has changed and it can't parse it any more.  I can't find the 1080p `https-5000` format in the M3U8 or JSON, but it shows up with doing `--list-formats` so it should still be there.

I've tested this on a bunch of videos that worked before, and they're all broken now, so it seems this change is site-wide.  You previously didn't need to be logged in for the extractor to work, but I tested being logged out and logged in and both give the same error, so that's not the problem.

@nixxo has previously fixed this extractor in the past, so hopefully they can look at it again.

### 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.exe -vU https://www.raiplay.it/programmi/solecuoreamore
[debug] Command-line config: ['-vU', 'https://www.raiplay.it/programmi/solecuoreamore']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.12.30 from yt-dlp/yt-dlp [f10589e34] (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 N-109444-geef763c705-20221222 (setts), ffprobe N-109444-geef763c705-20221222, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.19.1, brotli-1.1.0, certifi-2023.11.17, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.1.0, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1798 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2023.12.30 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2023.12.30 from yt-dlp/yt-dlp)
[RaiPlayPlaylist] Extracting URL: https://www.raiplay.it/programmi/solecuoreamore
[RaiPlayPlaylist] solecuoreamore: Downloading program JSON
[RaiPlayPlaylist] ContentSet-da756fb7-0eb0-4c58-95fe-d0e49440d8a6: Downloading content set JSON
[download] Downloading playlist: Sole Cuore Amore
[RaiPlayPlaylist] Playlist Sole Cuore Amore: Downloading 1 items of 1
[download] Downloading item 1 of 1
[RaiPlay] Extracting URL: https://www.raiplay.it/video/2019/08/Sole-Cuore-Amore-20ea42ca-d856-44de-8eac-05ecddd67192.json
[RaiPlay] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading video JSON
[RaiPlay] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading XML metadata
[RaiPlay] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading m3u8 information
[debug] [RaiPlay] Creating https format for quality 1200
[debug] [RaiPlay] Creating https format for quality 1800
[debug] [RaiPlay] Creating https format for quality 2400
[debug] [RaiPlay] Creating https format for quality 3600
[debug] [RaiPlay] Creating https format for quality 5000
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 20ea42ca-d856-44de-8eac-05ecddd67192: Downloading 1 format(s): https-5000
[debug] Invoking http downloader on "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=8Pz8oQnrQmQ5NsuDPtWg9weeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-5000"
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 4082, in urlopen
  File "yt_dlp\networking\common.py", line 114, in send
  File "yt_dlp\networking\_helper.py", line 204, in wrapper
  File "yt_dlp\networking\common.py", line 325, in send
  File "yt_dlp\networking\_requests.py", line 343, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3418, in process_info
  File "yt_dlp\YoutubeDL.py", line 3139, in dl
  File "yt_dlp\downloader\common.py", line 455, in download
  File "yt_dlp\downloader\http.py", line 364, in real_download
  File "yt_dlp\downloader\http.py", line 120, in establish_connection
  File "yt_dlp\YoutubeDL.py", line 4114, in urlopen
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden

[download] Finished downloading playlist: Sole Cuore Amore
```



Discussion:
Capita anche a me su Ubuntu 23.10
I confirm the issue. (And elsewhere only the video stream is available for download). Ok via browser.
https://www.raiplay.it/video/2024/02/Un-posto-al-sole---Puntata-del-06022024-EP6377-c160ce25-14ff-4b89-97e5-3d24d04a8dac.html
I'll look into it in the weekend.
Da una analisi veloce sembra che rai abbia disabilitato il download del file mp4 sui nuovi contenuti, rimane attivo il download tramite manifest m3u8.
@nixxo Grazie nixxo; scusa potresti suggerirmi come fare per scaricare (es. link postato sopra) ? rai3 giorno 6/02: programmi del mattino perfetti invece Un posto al sole forbidden. Altri downloader scaricano solo video.  Sarebbe per me un dono immenso se mi scrivessi qui i comandi (o le operazioni da eseguire) per scaricare quel video (di solito è sempre 720, mai 1080). Grazie per la pazienza. Un saluto.
@nixxo se si omette "&overrideUserAgentRule=mp4-*" dagli ID hls-* restituisce l'elenco completo anziche errore 403.

yt-dlp -F https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html
ID                       EXT RESOLUTION │  FILESIZE   TBR PROTO │ VCODEC     ACODEC  MORE INFO
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
hls-aac-Audiodescrizione mp4 audio only │                 m3u8  │ audio only unknown [Audiodescrizione] Audiodescrizione
hls-aac-Italiano         mp4 audio only │                 m3u8  │ audio only unknown [Italiano] Italiano
hls-1800                 mp4 1024x576   │ ~ 3.85GiB 1758k m3u8  │ unknown    unknown
https-1800               mp4 1024x576   │ ≈ 3.85GiB 1758k https │ unknown    unknown
hls-2400                 mp4 1280x720   │ ~ 5.13GiB 2344k m3u8  │ unknown    unknown
https-2400               mp4 1280x720   │ ≈ 5.13GiB 2344k https │ unknown    unknown
hls-3600                 mp4 1600x900   │ ~ 7.70GiB 3516k m3u8  │ unknown    unknown
https-3600               mp4 1600x900   │ ≈ 7.70GiB 3516k https │ unknown    unknown
hls-5000                 mp4 1920x1080  │ ~11.41GiB 5210k m3u8  │ unknown    unknown
https-5000               mp4 1920x1080  │ ≈10.95GiB 5000k https │ unknown    unknown

yt-dlp -f https-1800 -g https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html
https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-1800

ffmpeg -i "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-1800"
[https @ 0x55c8536d2180] HTTP error 403 Forbidden
https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-1800: Server returned 403 Forbidden (access denied)

ffmpeg -i "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual"
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b1758000_vo_slita_t64MTgwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b2344000_vo_slita_t64MjQwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b3516000_vo_slita_t64MzYwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b5210000_vo_slita_t64NTAwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b192400_ao_slItaliano_t64SXRhbGlhbm9fYXVkaW8=.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b192400_ao_slAudiodescrizione_t64QXVkaW9kZXNjcml6aW9uZV9hdWRpbw==.m3u8' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b1758000_vo_slita_t64MTgwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b1758000_vo_slita_t64MTgwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b2344000_vo_slita_t64MjQwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b2344000_vo_slita_t64MjQwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b3516000_vo_slita_t64MzYwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b3516000_vo_slita_t64MzYwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b5210000_vo_slita_t64NTAwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b5210000_vo_slita_t64NTAwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slItaliano_t64SXRhbGlhbm9fYXVkaW8=_0.aac' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slItaliano_t64SXRhbGlhbm9fYXVkaW8=_1.aac' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slAudiodescrizione_t64QXVkaW9kZXNjcml6aW9uZV9hdWRpbw==_0.aac' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slAudiodescrizione_t64QXVkaW9kZXNjcml6aW9uZV9hdWRpbw==_1.aac' for reading
Input #0, hls,applehttp, from 'https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual':
  Duration: 05:06:08.27, start: 0.000000, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 1758000
    Stream #0:0: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 1758000
    Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 1758000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
  Program 1 
    Metadata:
      variant_bitrate : 2344000
    Stream #0:2: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 2344000
    Stream #0:3: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 2344000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
  Program 2 
    Metadata:
      variant_bitrate : 3516000
    Stream #0:4: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 3516000
    Stream #0:5: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1600x900 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 3516000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
  Program 3 
    Metadata:
      variant_bitrate : 5210000
    Stream #0:6: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 5210000
    Stream #0:7: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 5210000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
At least one output file must be specified


 
> @nixxo Grazie nixxo; scusa potresti suggerirmi come fare per scaricare (es. link postato sopra) ? rai3 giorno 6/02: programmi del mattino perfetti invece Un posto al sole forbidden. Altri downloader scaricano solo video. Sarebbe per me un dono immenso se mi scrivessi qui i comandi (o le operazioni da eseguire) per scaricare quel video (di solito è sempre 720, mai 1080). Grazie per la pazienza. Un saluto.

se non hai risolto ancora prova così:
ffmpeg -hide_banner -v error -stats -i "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=FYY9VJwfRu44xgXiNSspPAeeqqEEqualeeqqEEqual" -map 0:3 -map 0:4 -c copy file.mkv
l'addon di kodi funziona ed estrae un altro m3u8.
https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html
https://vod9-rai-it.akamaized.net/podcastcdn/raiuno/sanremo_pushcdn/22301040_,1800,2400,3600/playlist.m3u8?auth=daEaKdha1bGaQcMaJagaObodNcHchc_bmbL-bLX6N8-c0-GmyuuFp&aifp=V001|User-Agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F84.0.4147.105+Safari%2F537.36
Capita anche a me su Ubuntu 23.10
I confirm the issue. (And elsewhere only the video stream is available for download). Ok via browser.
https://www.raiplay.it/video/2024/02/Un-posto-al-sole---Puntata-del-06022024-EP6377-c160ce25-14ff-4b89-97e5-3d24d04a8dac.html
I'll look into it in the weekend.
Da una analisi veloce sembra che rai abbia disabilitato il download del file mp4 sui nuovi contenuti, rimane attivo il download tramite manifest m3u8.
@nixxo Grazie nixxo; scusa potresti suggerirmi come fare per scaricare (es. link postato sopra) ? rai3 giorno 6/02: programmi del mattino perfetti invece Un posto al sole forbidden. Altri downloader scaricano solo video.  Sarebbe per me un dono immenso se mi scrivessi qui i comandi (o le operazioni da eseguire) per scaricare quel video (di solito è sempre 720, mai 1080). Grazie per la pazienza. Un saluto.
@nixxo se si omette "&overrideUserAgentRule=mp4-*" dagli ID hls-* restituisce l'elenco completo anziche errore 403.

yt-dlp -F https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html
ID                       EXT RESOLUTION │  FILESIZE   TBR PROTO │ VCODEC     ACODEC  MORE INFO
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
hls-aac-Audiodescrizione mp4 audio only │                 m3u8  │ audio only unknown [Audiodescrizione] Audiodescrizione
hls-aac-Italiano         mp4 audio only │                 m3u8  │ audio only unknown [Italiano] Italiano
hls-1800                 mp4 1024x576   │ ~ 3.85GiB 1758k m3u8  │ unknown    unknown
https-1800               mp4 1024x576   │ ≈ 3.85GiB 1758k https │ unknown    unknown
hls-2400                 mp4 1280x720   │ ~ 5.13GiB 2344k m3u8  │ unknown    unknown
https-2400               mp4 1280x720   │ ≈ 5.13GiB 2344k https │ unknown    unknown
hls-3600                 mp4 1600x900   │ ~ 7.70GiB 3516k m3u8  │ unknown    unknown
https-3600               mp4 1600x900   │ ≈ 7.70GiB 3516k https │ unknown    unknown
hls-5000                 mp4 1920x1080  │ ~11.41GiB 5210k m3u8  │ unknown    unknown
https-5000               mp4 1920x1080  │ ≈10.95GiB 5000k https │ unknown    unknown

yt-dlp -f https-1800 -g https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html
https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-1800

ffmpeg -i "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-1800"
[https @ 0x55c8536d2180] HTTP error 403 Forbidden
https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-1800: Server returned 403 Forbidden (access denied)

ffmpeg -i "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual"
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b1758000_vo_slita_t64MTgwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b2344000_vo_slita_t64MjQwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b3516000_vo_slita_t64MzYwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b5210000_vo_slita_t64NTAwMA==.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b192400_ao_slItaliano_t64SXRhbGlhbm9fYXVkaW8=.m3u8' for reading
[https @ 0x56390d372380] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/chunklist_b192400_ao_slAudiodescrizione_t64QXVkaW9kZXNjcml6aW9uZV9hdWRpbw==.m3u8' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b1758000_vo_slita_t64MTgwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b1758000_vo_slita_t64MTgwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b2344000_vo_slita_t64MjQwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b2344000_vo_slita_t64MjQwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b3516000_vo_slita_t64MzYwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b3516000_vo_slita_t64MzYwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b5210000_vo_slita_t64NTAwMA==_0.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b5210000_vo_slita_t64NTAwMA==_1.ts' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slItaliano_t64SXRhbGlhbm9fYXVkaW8=_0.aac' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slItaliano_t64SXRhbGlhbm9fYXVkaW8=_1.aac' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slAudiodescrizione_t64QXVkaW9kZXNjcml6aW9uZV9hdWRpbw==_0.aac' for reading
[hls,applehttp @ 0x56390d0d96c0] Opening 'https://vod8-rai-it.akamaized.net/podcastcdn/raiuno/raiuno_multiaudio_nogeo/22348652_,1800,2400,3600,5000/media_b192400_ao_slAudiodescrizione_t64QXVkaW9kZXNjcml6aW9uZV9hdWRpbw==_1.aac' for reading
Input #0, hls,applehttp, from 'https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=9z9OdWSoNZuALk12PWClwweeqqEEqualeeqqEEqual':
  Duration: 05:06:08.27, start: 0.000000, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 1758000
    Stream #0:0: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 1758000
    Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 1758000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
  Program 1 
    Metadata:
      variant_bitrate : 2344000
    Stream #0:2: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 2344000
    Stream #0:3: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 2344000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
  Program 2 
    Metadata:
      variant_bitrate : 3516000
    Stream #0:4: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 3516000
    Stream #0:5: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1600x900 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 3516000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
  Program 3 
    Metadata:
      variant_bitrate : 5210000
    Stream #0:6: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 5210000
    Stream #0:7: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 5210000
    Stream #0:8(Italiano): Audio: aac (LC), 44100 Hz, stereo, fltp, 242 kb/s (default)
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Italiano
    Stream #0:9(Audiodescrizione): Audio: aac (LC), 44100 Hz, stereo, fltp, 221 kb/s
    Metadata:
      id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x00\x00
      comment         : Audiodescrizione
At least one output file must be specified


 
> @nixxo Grazie nixxo; scusa potresti suggerirmi come fare per scaricare (es. link postato sopra) ? rai3 giorno 6/02: programmi del mattino perfetti invece Un posto al sole forbidden. Altri downloader scaricano solo video. Sarebbe per me un dono immenso se mi scrivessi qui i comandi (o le operazioni da eseguire) per scaricare quel video (di solito è sempre 720, mai 1080). Grazie per la pazienza. Un saluto.

se non hai risolto ancora prova così:
ffmpeg -hide_banner -v error -stats -i "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=FYY9VJwfRu44xgXiNSspPAeeqqEEqualeeqqEEqual" -map 0:3 -map 0:4 -c copy file.mkv
l'addon di kodi funziona ed estrae un altro m3u8.
https://www.raiplay.it/video/2024/02/Sanremo-2024---74-Festival-della-Canzone-Italiana---Serata-Finale-del-10022024-c31c3075-13ab-4c3b-9133-91391eab7efb.html
https://vod9-rai-it.akamaized.net/podcastcdn/raiuno/sanremo_pushcdn/22301040_,1800,2400,3600/playlist.m3u8?auth=daEaKdha1bGaQcMaJagaObodNcHchc_bmbL-bLX6N8-c0-GmyuuFp&aifp=V001|User-Agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F84.0.4147.105+Safari%2F537.36

Resolving patch:
diff --git a/yt_dlp/extractor/rai.py b/yt_dlp/extractor/rai.py
--- a/yt_dlp/extractor/rai.py
+++ b/yt_dlp/extractor/rai.py
@@ -1,6 +1,7 @@
 import re
 
 from .common import InfoExtractor
+from ..networking import HEADRequest
 from ..utils import (
     clean_html,
     determine_ext,
@@ -91,7 +92,7 @@ def fix_cdata(s):
             self.raise_geo_restricted(countries=self._GEO_COUNTRIES, metadata_available=True)
 
         if not audio_only and not is_live:
-            formats.extend(self._create_http_urls(media_url, relinker_url, formats))
+            formats.extend(self._create_http_urls(media_url, relinker_url, formats, video_id))
 
         return filter_dict({
             'is_live': is_live,
@@ -99,7 +100,7 @@ def fix_cdata(s):
             'formats': formats,
         })
 
-    def _create_http_urls(self, manifest_url, relinker_url, fmts):
+    def _create_http_urls(self, manifest_url, relinker_url, fmts, video_id):
         _MANIFEST_REG = r'/(?P<id>\w+)(?:_(?P<quality>[\d\,]+))?(?:\.mp4)?(?:\.csmil)?/playlist\.m3u8'
         _MP4_TMPL = '%s&overrideUserAgentRule=mp4-%s'
         _QUALITY = {
@@ -166,6 +167,14 @@ def get_format_info(tbr):
                 'fps': 25,
             }
 
+        # Check if MP4 download is available
+        try:
+            self._request_webpage(
+                HEADRequest(_MP4_TMPL % (relinker_url, '*')), video_id, 'Checking MP4 availability')
+        except ExtractorError as e:
+            self.to_screen(f'{video_id}: MP4 direct download is not available: {e.cause}')
+            return []
+
         # filter out single-stream formats
         fmts = [f for f in fmts
                 if not f.get('vcodec') == 'none' and not f.get('acodec') == 'none']


Test patch: