Repository: yt-dlp/yt-dlp

Issue:
www.france.tv - live stream - 403 Forbidden + No video formats found
### 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

france

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

Urls on live streams no more work : 
yt-dlp https://www.france.tv/france-5/direct.html

This issue seems to not be a duplicate because here there are 403 warnings :
```
WARNING: [FranceTV] Failed to download m3u8 information: HTTP Error 403: Forbidden
[FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: Downloading m3u8 information
WARNING: [FranceTV] Failed to download m3u8 information: HTTP Error 403: Forbidden
[FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: Checking for geo-restriction
ERROR: [FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: No video formats found!; please report this issue 
```

### 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.france.tv/france-5/direct.html
[debug] Command-line config: ['-vU', 'https://www.france.tv/france-5/direct.html']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.03.06.232659 from yt-dlp/yt-dlp-nightly-builds [cd7086c0d] (zip)
[debug] Python 3.9.18 (CPython x86_64 64bit) - Linux-6.7.6-x86_64-Intel-R-_Core-TM-_i3-6100H_CPU_@_2.70GHz-with-glibc2.33 (OpenSSL 1.1.1w  11 Sep 2023, glibc 2.33)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: brotli-1.0.9, certifi-2021.10.08, requests-2.26.0, sqlite3-3.37.2, urllib3-1.26.8
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1836 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.03.06.232659 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.03.06.232659 from yt-dlp/yt-dlp-nightly-builds)
[FranceTVSite] Extracting URL: https://www.france.tv/france-5/direct.html
[FranceTVSite] direct: Downloading webpage
[FranceTV] Extracting URL: francetv:45007886-f3ff-4b3e-9706-1ef1014c5a60#__youtubedl_smuggle=%7B%22hostname%22%3A+%22www.france.tv%22%7D
[FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: Downloading desktop chrome video JSON
[FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: Downloading mobile safari video JSON
[FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: Downloading m3u8 information
WARNING: [FranceTV] Failed to download m3u8 information: HTTP Error 403: Forbidden
[FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: Downloading m3u8 information
WARNING: [FranceTV] Failed to download m3u8 information: HTTP Error 403: Forbidden
[FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: Checking for geo-restriction
ERROR: [FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: No video formats found!; 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
Traceback (most recent call last):
  File "/yt-dlp/yt_dlp/YoutubeDL.py", line 1593, in wrapper
    return func(self, *args, **kwargs)
  File "/yt-dlp/yt_dlp/YoutubeDL.py", line 1749, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/yt-dlp/yt_dlp/YoutubeDL.py", line 1808, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/yt-dlp/yt_dlp/YoutubeDL.py", line 2795, in process_video_result
    self.raise_no_formats(info_dict)
  File "/yt-dlp/yt_dlp/YoutubeDL.py", line 1091, in raise_no_formats
    raise ExtractorError(msg, video_id=info['id'], ie=info['extractor'],
yt_dlp.utils.ExtractorError: [FranceTV] 45007886-f3ff-4b3e-9706-1ef1014c5a60: No video formats found!; 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
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/francetv.py b/yt_dlp/extractor/francetv.py
--- a/yt_dlp/extractor/francetv.py
+++ b/yt_dlp/extractor/francetv.py
@@ -119,8 +119,7 @@ def _extract_video(self, video_id, hostname=None):
             video_url = video['url']
             format_id = video.get('format')
 
-            token_url = url_or_none(video.get('token'))
-            if token_url and video.get('workflow') == 'token-akamai':
+            if token_url := url_or_none(video.get('token')):
                 tokenized_url = traverse_obj(self._download_json(
                     token_url, video_id, f'Downloading signed {format_id} manifest URL',
                     fatal=False, query={
@@ -255,6 +254,26 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
             'thumbnail': r're:^https?://.*\.jpg$',
             'duration': 1441,
         },
+    }, {
+        # geo-restricted livestream (workflow == 'token-akamai')
+        'url': 'https://www.france.tv/france-4/direct.html',
+        'info_dict': {
+            'id': '9a6a7670-dde9-4264-adbc-55b89558594b',
+            'ext': 'mp4',
+            'title': r're:France 4 en direct .+',
+            'live_status': 'is_live',
+        },
+        'skip': 'geo-restricted livestream',
+    }, {
+        # livestream (workflow == 'dai')
+        'url': 'https://www.france.tv/france-2/direct.html',
+        'info_dict': {
+            'id': '006194ea-117d-4bcf-94a9-153d999c59ae',
+            'ext': 'mp4',
+            'title': r're:France 2 en direct .+',
+            'live_status': 'is_live',
+        },
+        'params': {'skip_download': 'livestream'},
     }, {
         # france3
         'url': 'https://www.france.tv/france-3/des-chiffres-et-des-lettres/139063-emission-du-mardi-9-mai-2017.html',
@@ -271,10 +290,6 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
         # franceo
         'url': 'https://www.france.tv/france-o/archipels/132249-mon-ancetre-l-esclave.html',
         'only_matching': True,
-    }, {
-        # france2 live
-        'url': 'https://www.france.tv/france-2/direct.html',
-        'only_matching': True,
     }, {
         'url': 'https://www.france.tv/documentaires/histoire/136517-argentine-les-500-bebes-voles-de-la-dictature.html',
         'only_matching': True,


Test patch: