Repository: yt-dlp
Issue: [chzzk:video] HTTP Error 400: Bad Request
Labels: NSFW,site-bug

### 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)
- [ ] 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

South Korea

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

```
./yt-dlp -vU --print-traffic https://chzzk.naver.com/video/3420720
```
Trying download any vod fails with `yt_dlp.networking.exceptions.HTTPError: HTTP Error 400: Bad Request`

### 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', '--print-traffic', 'https://chzzk.naver.com/video/3420720']
[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.09.08.232909 from yt-dlp/yt-dlp-nightly-builds [d1c4d88b2] (zip)
[debug] Python 3.12.5 (CPython x86_64 64bit) - Linux-6.9.11-amd64-x86_64-with-glibc2.40 (OpenSSL 3.3.2 3 Sep 2024, glibc 2.40)
[debug] exe versions: ffmpeg 7.0.2-3 (setts), ffprobe 7.0.2-3
[debug] Optional libraries: Cryptodome-3.20.0, certifi-2024.06.02, requests-2.32.3, sqlite3-3.46.1, urllib3-2.0.7
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests
[debug] Loaded 1832 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
director: Handler preferences for this request: urllib=0, requests=100
director: Checking if "requests" supports this request.
director: Sending request via "requests"
requests: Starting new HTTPS connection (1): api.github.com:443
send: b'GET /repos/yt-dlp/yt-dlp-nightly-builds/releases/latest HTTP/1.1\r\nHost: api.github.com\r\nConnection: keep-alive\r\nUser-Agent: yt-dlp\r\nAccept: application/vnd.github+json\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nX-Github-Api-Version: 2022-11-28\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 13 Sep 2024 05:05:35 GMT
header: Content-Type: application/json; charset=utf-8
header: Cache-Control: public, max-age=60, s-maxage=60
header: Vary: Accept,Accept-Encoding, Accept, X-Requested-With
header: ETag: W/"4a777ebe329bea01e82fc28d674403b5599f2f2bc6f2c898dac538ae2d4f9ede"
header: Last-Modified: Sun, 08 Sep 2024 23:36:14 GMT
header: X-GitHub-Media-Type: github.v3; format=json
header: x-github-api-version-selected: 2022-11-28
header: Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
header: Access-Control-Allow-Origin: *
header: Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
header: X-Frame-Options: deny
header: X-Content-Type-Options: nosniff
header: X-XSS-Protection: 0
header: Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
header: Content-Security-Policy: default-src 'none'
header: Content-Encoding: gzip
header: Server: github.com
header: X-RateLimit-Limit: 60
header: X-RateLimit-Remaining: 57
header: X-RateLimit-Reset: 1726207513
header: X-RateLimit-Resource: core
header: X-RateLimit-Used: 3
header: Accept-Ranges: bytes
header: Transfer-Encoding: chunked
header: X-GitHub-Request-Id: 906A:1B659A:10F23E1:125157B:66E3C81F
Latest version: nightly@2024.09.08.232909 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.09.08.232909 from yt-dlp/yt-dlp-nightly-builds)
[chzzk:video] Extracting URL: https://chzzk.naver.com/video/3420720
[chzzk:video] 3420720: Downloading video info
director: Handler preferences for this request: urllib=0, requests=100
director: Checking if "requests" supports this request.
director: Sending request via "requests"
requests: Starting new HTTPS connection (1): api.chzzk.naver.com:443
send: b'GET /service/v3/videos/3420720 HTTP/1.1\r\nHost: api.chzzk.naver.com\r\nConnection: keep-alive\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.17 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
reply: 'HTTP/1.1 200 \r\n'
header: Date: Fri, 13 Sep 2024 05:05:35 GMT
header: content-type: application/json
header: transfer-encoding: chunked
header: vary: Origin
header: vary: Access-Control-Request-Method
header: vary: Access-Control-Request-Headers
header: x-content-type-options: nosniff
header: x-xss-protection: 0
header: cache-control: no-cache, no-store, max-age=0, must-revalidate
header: pragma: no-cache
header: expires: 0
header: x-frame-options: DENY
header: referrer-policy: unsafe-url
header: server: nfront
[chzzk:video] 3420720: Downloading video playback
director: Handler preferences for this request: urllib=0, requests=100
director: Checking if "requests" supports this request.
director: Sending request via "requests"
requests: Starting new HTTPS connection (1): apis.naver.com:443
send: b'GET /neonplayer/vodplay/v1/playback/None?key=None&env=real&lc=en_US&cpl=en_US HTTP/1.1\r\nHost: apis.naver.com\r\nConnection: keep-alive\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.17 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Server: nginx
header: Date: Fri, 13 Sep 2024 05:05:35 GMT
header: Content-Type: application/xhtml+xml
header: Transfer-Encoding: chunked
header: Connection: keep-alive
header: Keep-Alive: timeout=5
header: apigw-uuid: 3751f7dd-9b23-4900-bc4a-0c83c441a252
header: set-cookie: JSESSIONID=C4997C8E5D3CAF364921DD87671C1718; Path=/; HttpOnly
header: server-timing: total;desc="total duration of the request";dur=3.0
header: access-control-allow-credentials: true
header: referrer-policy: unsafe-url
header: apigw-error: 084
ERROR: [chzzk:video] 3420720: Unable to download video playback: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/common.py", line 740, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/chzzk.py", line 149, in _real_extract
    formats, subtitles = self._extract_mpd_formats_and_subtitles(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/common.py", line 2612, in _extract_mpd_formats_and_subtitles
    periods = self._extract_mpd_periods(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/common.py", line 2622, in _extract_mpd_periods
    res = self._download_xml_handle(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/common.py", line 1099, in download_handle
    res = self._download_webpage_handle(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/common.py", line 960, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/common.py", line 909, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/extractor/common.py", line 896, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query, extensions))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/YoutubeDL.py", line 4165, in urlopen
    return self._request_director.send(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/networking/common.py", line 117, in send
    response = handler.send(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/networking/_helper.py", line 208, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./yt-dlp/yt_dlp/networking/common.py", line 340, in send
    return self._send(request)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/hibot/radiyudown/./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 400: Bad Request
```