Repository: yt-dlp
Issue: HiDive Extractor broken after site update
Labels: DRM,account-needed,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

_No response_

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

HiDive was updated earlier today which appears to be a complete rework of the site (or at least their URLs). Below I've included two logs, one using the old format and one using the new format. I'm not expecting the new one to actually work but included it anyway in case there's anything interesting.

For example these two URLs are the same video, the first being the old format and the second being how it appears after the update:

`https://www.hidive.com/stream/chained-soldier/s01e010`
`https://www.hidive.com/video/590403?seasonId=20685`

### 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 -f "(b[language=ja][height<=1080])" "https://www.hidive.com/stream/chained-soldier/s01e010" --cookies-from-browser firefox -o "%(series)s_S%(season_number)s_E%(episode_number)s_%(episode)s.%(ext)s" --embed-subs --sub-lang english-subs --sub-format vtt --write-subs  -N 64 --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" -vU
[debug] Command-line config: ['-f', '(b[language=ja][height<=1080])', 'https://www.hidive.com/stream/chained-soldier/s01e010', '--cookies-from-browser', 'firefox', '-o', '%(series)s_S%(season_number)s_E%(episode_number)s_%(episode)s.%(ext)s', '--embed-subs', '--sub-lang', 'english-subs', '--sub-format', 'vtt', '--write-subs', '-N', '64', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0', '-vU']
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/user/.mozilla/firefox/ci8h4s4e.default-release/cookies.sqlite"
Extracted 477 cookies from firefox
[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.12.30 from yt-dlp/yt-dlp [f10589e34] (pip)
[debug] Python 3.11.7 (CPython x86_64 64bit) - Linux-6.7.6-arch1-1-x86_64-with-glibc2.39 (OpenSSL 3.2.1 30 Jan 2024, glibc 2.39)
[debug] exe versions: ffmpeg 6.1.1 (setts), ffprobe 6.1.1
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.07.22, mutagen-1.46.0, requests-2.31.0, sqlite3-3.45.1, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1798 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2023.12.30 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2023.12.30 from yt-dlp/yt-dlp)
[HiDive] Extracting URL: https://www.hidive.com/stream/chained-soldier/s01e010
[HiDive] chained-soldier/s01e010: Downloading JSON metadata
ERROR: [HiDive] chained-soldier/s01e010: chained-soldier/s01e010: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); 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 "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 718, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/hidive.py", line 76, in _real_extract
    settings = self._call_api(video_id, title, key)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/hidive.py", line 70, in _call_api
    return self._download_json(
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1072, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1042, in download_handle
    return parse(self, content, video_id, transform_source=transform_source, fatal=fatal, errnote=errnote), urlh
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1032, in parse
    return getattr(ie, parser)(content, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1019, in _parse_json
    self.__print_error('Failed to parse JSON' if errnote is None else errnote, fatal, video_id, ve)
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1002, in __print_error
    raise ExtractorError(f'{video_id}: {errnote}', cause=err)

  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/utils/_utils.py", line 553, in decode
    return super().decode(s)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1016, in _parse_json
    return json.loads(
           ^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 359, in loads
    return cls(**kw).decode(s)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/utils/_utils.py", line 561, in decode
    raise type(e)(f'{e.msg} in {s[e.pos - 10:e.pos + 10]!r}', s, e.pos)
json.decoder.JSONDecodeError: Expecting value in '': line 1 column 1 (char 0)


New URL:

yt-dlp -f "(b[language=ja][height<=1080])" "https://www.hidive.com/video/590403?seasonId=20685" --cookies-from-browser firefox -o "%(series)s_S%(season_number)s_E%(episode_number)s_%(episode)s.%(ext)s" --embed-subs --sub-lang english-subs --sub-format vtt --write-subs  -N 64 --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" -vU
[debug] Command-line config: ['-f', '(b[language=ja][height<=1080])', 'https://www.hidive.com/video/590403?seasonId=20685', '--cookies-from-browser', 'firefox', '-o', '%(series)s_S%(season_number)s_E%(episode_number)s_%(episode)s.%(ext)s', '--embed-subs', '--sub-lang', 'english-subs', '--sub-format', 'vtt', '--write-subs', '-N', '64', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0', '-vU']
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/user/.mozilla/firefox/ci8h4s4e.default-release/cookies.sqlite"
Extracted 477 cookies from firefox
[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.12.30 from yt-dlp/yt-dlp [f10589e34] (pip)
[debug] Python 3.11.7 (CPython x86_64 64bit) - Linux-6.7.6-arch1-1-x86_64-with-glibc2.39 (OpenSSL 3.2.1 30 Jan 2024, glibc 2.39)
[debug] exe versions: ffmpeg 6.1.1 (setts), ffprobe 6.1.1
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.07.22, mutagen-1.46.0, requests-2.31.0, sqlite3-3.45.1, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1798 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2023.12.30 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2023.12.30 from yt-dlp/yt-dlp)
[generic] Extracting URL: https://www.hidive.com/video/590403?seasonId=20685
[generic] 590403?seasonId=20685: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] 590403?seasonId=20685: Extracting information
[debug] Looking for embeds
WARNING: [MediaStream] None: Failed to parse JSON: Expecting property name enclosed in double quotes in '"1422",\n\t\t}': line 11 column 3 (char 418)
WARNING: [generic] 590403?seasonId=20685: Failed to parse JSON: Expecting property name enclosed in double quotes in '"1422",\n\t\t}': line 11 column 3 (char 418)
ERROR: Unsupported URL: https://www.hidive.com/video/590403?seasonId=20685
Traceback (most recent call last):
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1587, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1722, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 718, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/yt-dlp/lib/python3.11/site-packages/yt_dlp/extractor/generic.py", line 2531, in _real_extract
    raise UnsupportedError(url)
yt_dlp.utils.UnsupportedError: Unsupported URL: https://www.hidive.com/video/590403?seasonId=20685
```