Repository: yt-dlp/yt-dlp

Issue:
Not able to download zee5 series, failing with HTTP 402 even with cookies and username
### 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'm running yt-dlp version **2023.07.06** ([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 [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

_No response_

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

not able to download zee5 tv shows, failing with Unable to download JSON metadata: HTTP Error 402: Payment Required (caused by <HTTPError 402: 'Payment Required'>);

i have subscription account, tried with --cookies-from-browser and -u <username>

both option not working, but able to download if i pass single video url like "https://www.zee5.com/tv-shows/details/ammayi-garu/0-6-4z5243456/ambika-and-deepak-see-roopas-video/0-1-6z5411271" 

only complete series is not able to download

### 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
[debug] Command-line config: ['-vU', '-i', 'https://www.zee5.com/tv-shows/details/ammayi-garu/0-6-4z5243456', '-u', 'PRIVATE']
Type account password and press [Return]: 
[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.07.06 [b532a3481] (pip)
[debug] Python 3.10.6 (CPython arm64 64bit) - macOS-13.4.1-arm64-arm-64bit (OpenSSL 3.0.7 1 Nov 2022)
[debug] exe versions: ffmpeg 5.1.2 (setts), ffprobe 5.1.2, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.16.0, brotli-None, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
yt-dlp is up to date (stable@2023.07.06)
WARNING: [zee5:series] Login with password is not supported for this website. Use --cookies-from-browser or --cookies for the authentication. See  https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp  for how to manually pass cookies
[zee5:series] Extracting URL: https://www.zee5.com/tv-shows/details/ammayi-garu/0-6-4z5243456
[download] Downloading playlist: 0-6-4z5243456
[zee5:series] 0-6-4z5243456: Downloading access token
[zee5:series] 0-6-4z5243456: Downloading JSON metadata
[zee5:series] 0-6-4z5243456: Downloading JSON metadata page 1
ERROR: Unable to download JSON metadata: HTTP Error 402: Payment Required (caused by <HTTPError 402: 'Payment Required'>); 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 "/Users/navin/miniforge3/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 837, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
  File "/Users/navin/miniforge3/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 3863, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/Users/navin/miniforge3/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/Users/navin/miniforge3/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/Users/navin/miniforge3/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/Users/navin/miniforge3/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Users/navin/miniforge3/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 402: Payment Required

[zee5:series] Playlist 0-6-4z5243456: Downloading 1 items
[download] Finished downloading playlist: 0-6-4z5243456
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/zee5.py b/yt_dlp/extractor/zee5.py
--- a/yt_dlp/extractor/zee5.py
+++ b/yt_dlp/extractor/zee5.py
@@ -133,8 +133,8 @@ def _perform_login(self, username, password):
     def _real_extract(self, url):
         video_id, display_id = self._match_valid_url(url).group('id', 'display_id')
         access_token_request = self._download_json(
-            'https://useraction.zee5.com/token/platform_tokens.php?platform_name=web_app',
-            video_id, note='Downloading access token')
+            'https://launchapi.zee5.com/launch?platform_name=web_app',
+            video_id, note='Downloading access token')['platform_token']
         data = {
             'x-access-token': access_token_request['token']
         }
@@ -240,8 +240,8 @@ class Zee5SeriesIE(InfoExtractor):
 
     def _entries(self, show_id):
         access_token_request = self._download_json(
-            'https://useraction.zee5.com/token/platform_tokens.php?platform_name=web_app',
-            show_id, note='Downloading access token')
+            'https://launchapi.zee5.com/launch?platform_name=web_app',
+            show_id, note='Downloading access token')['platform_token']
         headers = {
             'X-Access-Token': access_token_request['token'],
             'Referer': 'https://www.zee5.com/',


Test patch: