Repository: yt-dlp
Issue: Hotstar HTTP Error 504: Gateway Time-out
Labels: account-needed,geo-blocked,site-bug,can-share-account

### 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

India

### Provide a description that is worded well enough to be understood

Downloading via yt-dlp is giving error 504 but this link works fine in the browser (Chrome). I was facing issues from last few day, but it was not very consistent. I have manged to download few time after allot of tries. But since yesterday this error has become consistent.

### 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 --cookies-from-browser chrome https://www.hotstar.com/in/shows/yeh-rishta-kya-kehlata-hai/586/a-shocker-for-akshara/1000285058/watch
[debug] Command-line config: ['-vU', '--cookies-from-browser', 'chrome', 'https://www.hotstar.com/in/shows/yeh-rishta-kya-kehlata-hai/586/a-shocker-for-akshara/1000285058/watch']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (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-109823-g385ec46424-20230211 (setts), ffprobe N-109823-g385ec46424-20230211
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[Cookies] Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\parms\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\parms\AppData\Local\Google\Chrome\User Data\Local State"
[Cookies] Extracted 601 cookies from chrome
[debug] cookie version breakdown: {'v10': 601, 'other': 0, 'unencrypted': 0}
[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
Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa
yt-dlp is up to date (stable@2023.07.06)
[hotstar] Extracting URL: https://www.hotstar.com/in/shows/yeh-rishta-kya-kehlata-hai/586/a-shocker-for-akshara/1000285058/watch
[hotstar] 1000285058: Downloading JSON metadata
ERROR: [hotstar] 1000285058: Unable to download JSON metadata: HTTP Error 504: Gateway Time-out (caused by <HTTPError 504: 'Gateway Time-out'>); 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 710, in extract
  File "yt_dlp\extractor\hotstar.py", line 189, in _real_extract
  File "yt_dlp\extractor\hotstar.py", line 27, in _call_api_v1
  File "yt_dlp\extractor\common.py", line 1064, in download_content
  File "yt_dlp\extractor\common.py", line 1028, in download_handle
  File "yt_dlp\extractor\common.py", line 898, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 855, in _request_webpage

  File "yt_dlp\extractor\common.py", line 837, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3863, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 504: Gateway Time-out
```