Repository: yt-dlp/yt-dlp

Issue:
Paramount+: HTTP Error 406: Not Acceptable
### 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.10.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 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

United States

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

Paramount+ extractor used to work well for TV shows and sports replays, now it is broken, as the initial API call returns HTTP error 406. Seems like the API has changed, but not sure if there is still an available workaround or not. 

### 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
yt-dlp -F https://www.paramountplus.com/shows/video/kGirBXHpqTs8cDR1lLP2JPUTsw414PIv/ -vU
[debug] Command-line config: ['-F', 'https://www.paramountplus.com/shows/video/kGirBXHpqTs8cDR1lLP2JPUTsw414PIv/', '-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.10.04 [4e0511f] (pip) API
[debug] Python 3.9.13 (CPython 64bit) - macOS-12.6-arm64-arm-64bit 
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1 (fdk,setts), ffprobe 5.1, rtmpdump 2.4
[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 1690 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [ParamountPlus] Extracting URL: https://www.paramountplus.com/shows/video/kGirBXHpqTs8cDR1lLP2JPUTsw414PIv/
[ParamountPlus] kGirBXHpqTs8cDR1lLP2JPUTsw414PIv: Downloading JSON metadata
ERROR: [ParamountPlus] kGirBXHpqTs8cDR1lLP2JPUTsw414PIv: Unable to download JSON metadata: HTTP Error 406: Not Acceptable (caused by <HTTPError 406: 'Not Acceptable'>); 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 "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 672, in extract
    ie_result = self._real_extract(url)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/cbs.py", line 70, in _real_extract
    return self._extract_video_info(self._match_id(url))
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/paramountplus.py", line 120, in _extract_video_info
    items_data = self._download_json(
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 1032, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 996, in download_handle
    res = self._download_webpage_handle(
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 866, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 823, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 805, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/YoutubeDL.py", line 3682, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 406: Not Acceptable
```



Discussion:
Just to reinforce the problem. Things were working well most of the day yesterday (10/17/2022) CDT. Then in late afternoon this error started to occur and persists still. Here are my details:
./yt-dlp_linux -vUN 10 https://www.paramountplus.com/shows/star-trek-picard/video/p_F16OmokbFpnKJC64lcdoP9_MdR1I7D/star-trek-picard-remembrance/
[debug] Command-line config: ['-vUN', '10', 'https://www.paramountplus.com/shows/star-trek-picard/video/p_F16OmokbFpnKJC64lcdoP9_MdR1I7D/star-trek-picard-remembrance/']
[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.10.04 [4e0511f] (linux_dir)
[debug] Python 3.10.7 (CPython 64bit) - Linux-4.15.0-192-generic-x86_64-with-glibc2.27 (glibc 2.27)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-60236-gffb000fff8-static (setts), ffprobe N-61656-gfbd22504c4-static
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.45.1, secretstorage-3.3.3, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1690 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [ParamountPlus] Extracting URL: https://www.paramountplus.com/shows/star-trek-picard/video/p_F16OmokbFpnKJC64lcdoP9_MdR1I7D/star-trek-picard-remembrance/
[ParamountPlus] p_F16OmokbFpnKJC64lcdoP9_MdR1I7D: Downloading JSON metadata
ERROR: [ParamountPlus] p_F16OmokbFpnKJC64lcdoP9_MdR1I7D: Unable to download JSON metadata: HTTP Error 406: Not Acceptable (caused by <HTTPError 406: 'Not Acceptable'>); 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 672, in extract
  File "yt_dlp/extractor/cbs.py", line 70, in _real_extract
  File "yt_dlp/extractor/paramountplus.py", line 120, in _extract_video_info
  File "yt_dlp/extractor/common.py", line 1032, in download_content
  File "yt_dlp/extractor/common.py", line 996, in download_handle
  File "yt_dlp/extractor/common.py", line 866, in _download_webpage_handle
  File "yt_dlp/extractor/common.py", line 823, in _request_webpage

  File "yt_dlp/extractor/common.py", line 805, in _request_webpage
  File "yt_dlp/YoutubeDL.py", line 3682, in urlopen
  File "urllib/request.py", line 525, in open
  File "urllib/request.py", line 634, in http_response
  File "urllib/request.py", line 563, in error
  File "urllib/request.py", line 496, in _call_chain
  File "urllib/request.py", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 406: Not Acceptable

I'm receiving this error as well for NCIS and NCIS Hawaii.

https://www.paramountplus.com/shows/video/1au4MEw0bhSWUFpjO9mhw3KRQrow18nm/

https://www.paramountplus.com/shows/video/zxXFNCc8XQvKSQkbOzgmY9A3FQkpBkwc/

```
[debug] Command-line config: ['-vU', '-i', '--all-subs', '--write-sub', '--convert-subs', 'srt', '--no-geo-bypass', '--no-check-certificate', '--cookies', "cookies.txt", '--format', 'bestvideo[height>=1080]+bestaudio/bestvideo+bestaudio/best', '-o', "NCIS.Hawai'i.S2E5.Sudden Death.WEBDL.mp4", 'https://www.paramountplus.com/shows/video/zxXFNCc8XQvKSQkbOzgmY9A3FQkpBkwc/']
[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.10.04 [4e0511f27] (zip)
[debug] Python 3.8.10 (CPython 64bit) - Linux-5.4.0-128-generic-x86_64-with-glibc2.29 (glibc 2.31)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.2.7, ffprobe N-103927-g68815d6791
[debug] Optional libraries: Cryptodome-3.14.1, certifi-2019.11.28, secretstorage-2.3.1, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1697 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [ParamountPlus] Extracting URL: https://www.paramountplus.com/shows/video/zxXFNCc8XQvKSQkbOzgmY9A3FQkpBkwc/
[ParamountPlus] zxXFNCc8XQvKSQkbOzgmY9A3FQkpBkwc: Downloading JSON metadata
ERROR: [ParamountPlus] zxXFNCc8XQvKSQkbOzgmY9A3FQkpBkwc: Unable to download JSON metadata: HTTP Error 406: Not Acceptable (caused by <HTTPError 406: 'Not Acceptable'>); 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 "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 674, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/cbs.py", line 70, in _real_extract
    return self._extract_video_info(self._match_id(url))
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/paramountplus.py", line 120, in _extract_video_info
    items_data = self._download_json(
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 1034, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 998, in download_handle
    res = self._download_webpage_handle(
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 868, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 825, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 807, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 3685, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 406: Not Acceptable
```

Resolving patch:
diff --git a/yt_dlp/extractor/paramountplus.py b/yt_dlp/extractor/paramountplus.py
--- a/yt_dlp/extractor/paramountplus.py
+++ b/yt_dlp/extractor/paramountplus.py
@@ -40,7 +40,6 @@ class ParamountPlusIE(CBSBaseIE):
         'params': {
             'skip_download': 'm3u8',
         },
-        'expected_warnings': ['Ignoring subtitle tracks'],  # TODO: Investigate this
     }, {
         'url': 'https://www.paramountplus.com/shows/video/6hSWYWRrR9EUTz7IEe5fJKBhYvSUfexd/',
         'info_dict': {
@@ -63,7 +62,6 @@ class ParamountPlusIE(CBSBaseIE):
         'params': {
             'skip_download': 'm3u8',
         },
-        'expected_warnings': ['Ignoring subtitle tracks'],
     }, {
         'url': 'https://www.paramountplus.com/movies/video/vM2vm0kE6vsS2U41VhMRKTOVHyQAr6pC/',
         'info_dict': {
@@ -118,8 +116,11 @@ class ParamountPlusIE(CBSBaseIE):
 
     def _extract_video_info(self, content_id, mpx_acc=2198311517):
         items_data = self._download_json(
-            'https://www.paramountplus.com/apps-api/v2.0/androidtv/video/cid/%s.json' % content_id,
-            content_id, query={'locale': 'en-us', 'at': 'ABCqWNNSwhIqINWIIAG+DFzcFUvF8/vcN6cNyXFFfNzWAIvXuoVgX+fK4naOC7V8MLI='}, headers=self.geo_verification_headers())
+            f'https://www.paramountplus.com/apps-api/v2.0/androidtv/video/cid/{content_id}.json',
+            content_id, query={
+                'locale': 'en-us',
+                'at': 'ABCXgPuoStiPipsK0OHVXIVh68zNys+G4f7nW9R6qH68GDOcneW6Kg89cJXGfiQCsj0=',
+            }, headers=self.geo_verification_headers())
 
         asset_types = {
             item.get('assetType'): {


Test patch: