Repository: yt-dlp
Issue: cda.pl needs to detect drm and raise appropriate error
Labels: DRM,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'm running yt-dlp version **2023.10.13** ([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)
- [ ] 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

Poland

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

I used to be able to download videos from cda.pl, but a while ago the URL format changed and yt-dlp stopped working.

### 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', 'https://www.cda.pl/video/2114139f2/vfilm']
[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.10.13 [b634ba742] (pip)
[debug] Python 3.11.2 (CPython i686 32bit) - Linux-6.1.0-13-686-pae-i686-with-glibc2.36 (OpenSSL 3.0.11 19 Sep 2023, glibc 2.36)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.19.0, brotli-1.1.0, certifi-2023.07.22, mutagen-1.47.0, sqlite3-3.40.1, websockets-12.0
[debug] Proxy map: {}
[debug] Loaded 1890 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.10.13, Current version: stable@2023.10.13
yt-dlp is up to date (stable@2023.10.13)
[CDA] Extracting URL: https://www.cda.pl/video/2114139f2/vfilm
[CDA] 2114139f2: Downloading webpage
[CDA] 2114139f2: Fetching 480p url
ERROR: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
Traceback (most recent call last):
  File "/usr/lib/python3.11/encodings/idna.py", line 163, in encode
    raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/anton/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1567, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anton/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1723, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anton/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1782, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anton/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 2771, in process_video_result
    format['http_headers'] = self._calc_headers(collections.ChainMap(format, info_dict), load_cookies=True)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anton/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 2493, in _calc_headers
    cookies = self.cookiejar.get_cookies_for_url(info_dict['url'])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anton/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/cookies.py", line 1320, in get_cookies_for_url
    return self._cookies_for_request(urllib.request.Request(normalize_url(sanitize_url(url))))
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anton/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/utils/networking.py", line 158, in normalize_url
    netloc=url_parsed.netloc.encode('idna').decode('ascii'),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
```