Repository: yt-dlp
Issue: Unable to Download [NBC Olympics Streams] JSON Metadata 404 Error
Labels: DRM,geo-blocked,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)
- [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

United States

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

### Title:
Unable to Download NBC Olympics Streams: JSON Metadata 404 Error

### Description:
Hello,

I am encountering an issue when trying to download NBC Olympics streams using yt-dlp. The script fails with an HTTP 404 error when attempting to download JSON metadata. Here are the details of my setup and the error message:

**Script Used:**
```bash
#!/bin/bash

# Set base folder with quotes
export BASE_FOLDER="/Users/mikey/Media/Olympics"

# Function to download and stream
download_and_stream() {
	local day=$1
	local stream_url=$2
	local output_file="$BASE_FOLDER/track and field us olympic team trials day ${day}.mp4"

	yt-dlp -vU --ap-mso AlticeOne --ap-username PRIVATE --ap-password PRIVATE --hls-use-mpegts -o "$output_file" "$stream_url"
}
# Example usage for Day 1
download_and_stream 1 https://stream.nbcolympics.com/track-and-field-us-olympic-team-trials-day-1

# Repeat for other days with the correct URLs
# download_and_stream 2 "https://stream.nbcolympics.com/track-and-field-us-olympic-team-trials-day-2-usa"
# download_and_stream 3 "https://stream.nbcolympics.com/track-and-field-us-olympic-team-trials-day-3-usa"
```

**System Information:**
- yt-dlp version: 2024.06.22.232706
- ffmpeg version: 7.0.1
- Operating System: 14.5 (23F79)

### Steps to Reproduce:
1. Run the provided script.
2. Observe the HTTP 404 error when attempting to download JSON metadata.

### Additional Information:
- I have verified the URL accessibility from a web browser.
- The issue persists across different stream URLs for NBC Olympics.

### Request:
Please provide guidance on how to resolve this issue or any updates needed in the `NBCOlympicsStreamIE` extractor to handle this correctly. If additional information or logs are needed, I am happy to provide them.

Thank you for your assistance!

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [x] 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', '--ap-mso', 'AlticeOne', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', '--hls-use-mpegts', '-o', '/Users/mikey/Media/Olympics/track and field us olympic team trials day 1.mp4', 'https://stream.nbcolympics.com/track-and-field-us-olympic-team-trials-day-2']
[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.06.22.232706 from yt-dlp/yt-dlp-nightly-builds [a8520244b] (pip)
[debug] Python 3.12.3 (CPython arm64 64bit) - macOS-14.5-arm64-arm-64bit (OpenSSL 3.0.13 30 Jan 2024)
[debug] exe versions: ffmpeg 7.0.1 (setts), ffprobe 7.0.1
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.0.9, certifi-2024.02.02, mutagen-1.47.0, requests-2.32.3, sqlite3-3.45.3, urllib3-2.1.0, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1823 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.06.22.232706 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.06.22.232706 from yt-dlp/yt-dlp-nightly-builds)
[nbcolympics:stream] Extracting URL: https://stream.nbcolympics.com/track-and-field-us-olympic-team-trials-day-2
[nbcolympics:stream] track-and-field-us-olympic-team-trials-day-2: Downloading webpage
[nbcolympics:stream] 12004885: Downloading event config
ERROR: [nbcolympics:stream] track-and-field-us-olympic-team-trials-day-2: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>)
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 740, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/extractor/nbc.py", line 617, in _real_extract
    event_config = self._download_json(
                   ^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 1139, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 1099, in download_handle
    res = self._download_webpage_handle(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/extractor/adobepass.py", line 1366, in _download_webpage_handle
    return super()._download_webpage_handle(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/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 "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 909, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/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 "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 4141, in urlopen
    return self._request_director.send(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/networking/common.py", line 117, in send
    response = handler.send(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/networking/_helper.py", line 208, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/networking/common.py", line 337, in send
    return self._send(request)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/yt_dlp/networking/_requests.py", line 363, in _send
    raise HTTPError(res, redirect_loop=max_redirects_exceeded)
yt_dlp.networking.exceptions.HTTPError: HTTP Error 404: Not Found
```