Repository: yt-dlp
Issue: [google:podcasts] with cookies: Bad Request
Labels: 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

Germany

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

Trying to download something from Google podcasts with `--cookies-from-browser firefox` while logged in there leads to:

    ERROR: [google:podcasts] NjMzYjAwYzk2NDAwZTgwMDExN2U1MTEz: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)

With `--no-config` (so without cookies) it works. I can work around this for now by not using my config file for this one command, since I do not care that much about marking it as watched.

### 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 -vU --no-config --cookies-from-browser firefox "https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5hY2FzdC5jb20vcHVibGljL3Nob3dzL2xhdGVyYWxjYXN0/episode/NjMzYjAwYzk2NDAwZTgwMDExN2U1MTEz"
[debug] Command-line config: ['-vU', '--no-config', '--cookies-from-browser', 'firefox', 'https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5hY2FzdC5jb20vcHVibGljL3Nob3dzL2xhdGVyYWxjYXN0/episode/NjMzYjAwYzk2NDAwZTgwMDExN2U1MTEz']
[debug] Encodings: locale utf-8, fs utf-8, pref utf-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version master@2024.02.25.232126 from yt-dlp/yt-dlp-master-builds [e28e135d6] (zip)
[debug] Python 3.11.7 (CPython x86_64 64bit) - Linux-6.1.71-1-MANJARO-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, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.12.0, brotlicffi-1.1.0.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.31.0, secretstorage-3.3.3, sqlite3-3.45.1, urllib3-1.26.18, websockets-12.0
[debug] Proxy map: {}
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/fabian/.mozilla/firefox/rsbg1oxz.default-release-1/cookies.sqlite"
Extracted 648 cookies from firefox
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1833 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2024.02.25.232126 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2024.02.25.232126 from yt-dlp/yt-dlp-master-builds)
[google:podcasts] Extracting URL: https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5hY2FzdC5jb20vcHVibGljL3Nob3dzL2xhdGVyYWxjYXN0/episode/NjMzYjAwYzk2NDAwZTgwMDExN2U1MTEz
[google:podcasts] NjMzYjAwYzk2NDAwZTgwMDExN2U1MTEz: Downloading JSON metadata
ERROR: [google:podcasts] NjMzYjAwYzk2NDAwZTgwMDExN2U1MTEz: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/common.py", line 732, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/googlepodcasts.py", line 56, in _real_extract
    episode = self._batch_execute(
              ^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/googlepodcasts.py", line 16, in _batch_execute
    return json.loads(self._download_json(
                      ^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/common.py", line 1086, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/common.py", line 1050, in download_handle
    res = self._download_webpage_handle(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/common.py", line 920, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/common.py", line 877, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/extractor/common.py", line 864, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/YoutubeDL.py", line 4097, in urlopen
    return self._request_director.send(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/networking/common.py", line 115, in send
    response = handler.send(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/networking/_helper.py", line 204, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/networking/common.py", line 326, in send
    return self._send(request)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/hdd/downloads/./yt-dlp/yt_dlp/networking/_requests.py", line 351, in _send
    raise HTTPError(res, redirect_loop=max_redirects_exceeded)
yt_dlp.networking.exceptions.HTTPError: HTTP Error 400: Bad Request
```