Repository: yt-dlp
Issue: [GoogleDrive:Folder] Extractor returning 400 Bad Request. Error: Expected string or bytes-like object
Labels: 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

India

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

This issue occurs even with the test url ( https://drive.google.com/drive/folders/1dQ4sx0-__Nvg65rxTSgQrl7VyW_FZ9QI )  present in the  [GoogleDrive.py](https://github.com/yt-dlp/yt-dlp/blob/39e6c4cb44b9292e89ac0afec3cd0afc2ae8775f/yt_dlp/extractor/googledrive.py#L294)

Have confirmed with the latest nightly version

### 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://drive.google.com/drive/folders/1dQ4sx0-__Nvg65rxTSgQrl7VyW_FZ9QI']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.07.15.232803 from yt-dlp/yt-dlp-nightly-builds [39e6c4cb4] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 7.0-full_build-www.gyan.dev (setts), ffprobe 7.0-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.35.5, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1829 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.07.15.232803 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.07.15.232803 from yt-dlp/yt-dlp-nightly-builds)
[GoogleDrive:Folder] Extracting URL: https://drive.google.com/drive/folders/1dQ4sx0-__Nvg65rxTSgQrl7VyW_FZ9QI
[GoogleDrive:Folder] 1dQ4sx0-__Nvg65rxTSgQrl7VyW_FZ9QI: Downloading webpage
[GoogleDrive:Folder] 1dQ4sx0-__Nvg65rxTSgQrl7VyW_FZ9QI: Downloading webpage
WARNING: [GoogleDrive:Folder] Unable to download webpage: HTTP Error 400: Bad Request
ERROR: expected string or bytes-like object
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1622, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1757, in __extract_info
  File "yt_dlp\extractor\common.py", line 740, in extract
  File "yt_dlp\extractor\googledrive.py", line 339, in _real_extract
  File "yt_dlp\extractor\googledrive.py", line 323, in _call_api
  File "yt_dlp\extractor\common.py", line 1347, in _search_json
  File "yt_dlp\extractor\common.py", line 1313, in _search_regex
  File "re.py", line 201, in search
TypeError: expected string or bytes-like object
```