Repository: yt-dlp
Issue: Mango tv partially unsupported。error messge:HTTP Error 401: Unauthorized
Labels: geo-blocked,site-bug,triage

### 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

china

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

Mango TV, when trying to download "https://www.mgtv.com/b/693354/21790490.html?lastp=list_index", an error occurred as follows: yt_dlp.networking.exceptions.HTTPError: HTTP Error 401: Unauthorized. After investigation, this interface (https://pcweb.api.mgtv.com/player/getSource) returned an error. The error message is as follows:
{
"msg": "Due to copyright restrictions, this video is temporarily not available for playback in this country/region.",
"code": 40005,
"data": {},
"err_msg": "Due to copyright restrictions, this video is temporarily not available for playback in this country/region.",
"err_code": 40005,
"seqid": "ce599784a6a34dbaabfdc3a60acbee3a",
"timestamp": 1737699781060
}
Help!!!:

### 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: ['-F', '-vU', '--no-config', '--cookies-from-browser', 'firefox', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0', 'https://www.mgtv.com/b/693354/21790490.html?lastp=list_index']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version stable@2025.01.15 from yt-dlp/yt-dlp [c8541f8b1] (source)
[debug] Git HEAD: 35421d9b6
[debug] Python 3.10.7 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1q  5 Jul 2022)
Extracting cookies from firefox
Extracted 254 cookies from firefox
[debug] exe versions: ffmpeg n7.1-153-gaeb8631048-20250122 (setts), ffprobe n7.1-153-gaeb8631048-20250122
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.12.14, mutagen-1.47.0, requests-2.32.3, sqlite3-3.37.2, urllib3-2.3.0, websockets-14.2
[debug] Proxy map: {}
[debug] Extracting cookies from: "C:\Users\Administrator\AppData\Roaming\Mozilla\Firefox\Profiles\mfekanbk.default-release\cookies.sqlite"
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1844 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2025.01.15 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2025.01.15 from yt-dlp/yt-dlp)
[MangoTV] Extracting URL: https://www.mgtv.com/b/693354/21790490.html?lastp=list_index
[MangoTV] 21790490: Downloading JSON metadata
[MangoTV] 21790490: Downloading JSON metadata
ERROR: [MangoTV] 21790490: Unable to download JSON metadata: HTTP Error 401: Unauthorized (caused by <HTTPError 401: Unauthorized>)
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\extractor\common.py", line 742, in extract
    ie_result = self._real_extract(url)
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\extractor\mgtv.py", line 96, in _real_extract
    stream_data = self._download_json(
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\extractor\common.py", line 1152, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\extractor\common.py", line 1112, in download_handle
    res = self._download_webpage_handle(
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\extractor\common.py", line 962, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data,
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\extractor\common.py", line 911, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\extractor\common.py", line 898, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query, extensions))
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\YoutubeDL.py", line 4175, in urlopen
    return self._request_director.send(req)
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\networking\common.py", line 117, in send
    response = handler.send(request)
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\networking\_helper.py", line 208, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\networking\common.py", line 340, in send
    return self._send(request)
  File "C:\Users\Administrator\PycharmProjects\yt-dlp\yt_dlp\networking\_requests.py", line 365, in _send
    raise HTTPError(res, redirect_loop=max_redirects_exceeded)
yt_dlp.networking.exceptions.HTTPError: HTTP Error 401: Unauthorized
```