Repository: yt-dlp
Issue: Ytsearch for specific query abrubtly quits after getting playlist, no error, no download happens
Labels: cant-reproduce,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.07.06** ([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)
- [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

Netherlands

### Provide a description that is worded well enough to be understood

## Problem:

I use ytdlp to search "Greygori - Color gitano - Mix Version", the program outputs that it gets the playlist, but then quits without giving an error. It does not download the YouTube audio as requested. The command I use is as follows:

`ytdlp.exe -vU ytsearch1:"Greygori - Color gitano - Mix Version" -x`

The full output given:

```
[debug] Command-line config: ['-vU', 'ytsearch1:Greygori - Color gitano - Mix Version', '-x']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 4.4.1-full_build-www.gyan.dev (setts), ffprobe 4.4.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa
yt-dlp is up to date (stable@2023.07.06)
[youtube:search] Extracting URL: ytsearch1:Greygori - Color gitano - Mix Version
[download] Downloading playlist: Greygori - Color gitano - Mix Version
[youtube:search] query "Greygori - Color gitano - Mix Version": Downloading web client config
[youtube:search] query "Greygori - Color gitano - Mix Version" page 1: Downloading API JSON
[youtube:search] Playlist Greygori - Color gitano - Mix Version: Downloading 0 items
[download] Finished downloading playlist: Greygori - Color gitano - Mix Version
```

## Expected result

I would expect it to find and download the first result for the given query. This video is found when manually searching youtube: https://youtu.be/hYXZoYGFZLs. When giving that video ID to ytdlp it will download it succesfully, no problems. It's only the search that does not work. 

## Further explanation

The weird thing is that any other query I've tried does work, and I've tried thousands. Even changing the query to simply "Greygori - Color gitano" works. Changing the command to ytsearch2 (so I'd get 2 downloads normally) does not change the result, it still quits before downloading with no error message.

Adding --dump-json gives me the same output as I pasted above, no json is generated.

## How could it be fixed

I don't know enough about the internals of ytdlp to comment on this. I'd say look at possible reasons it could quit at that point in the (after `[download] Finished downloading playlist: {search term here}`), and find out why it happens only for this search query.

## Write pages dumps

When adding --write-pages to the command, I get these dumps.
https://gist.github.com/RuurdBijlsma/51aeecf7b9d123156ff6c3b232fe35dc

### 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', 'ytsearch1:Greygori - Color gitano - Mix Version', '-x']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 4.4.1-full_build-www.gyan.dev (setts), ffprobe 4.4.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa
yt-dlp is up to date (stable@2023.07.06)
[youtube:search] Extracting URL: ytsearch1:Greygori - Color gitano - Mix Version
[download] Downloading playlist: Greygori - Color gitano - Mix Version
[youtube:search] query "Greygori - Color gitano - Mix Version": Downloading web client config
[youtube:search] query "Greygori - Color gitano - Mix Version" page 1: Downloading API JSON
[youtube:search] Playlist Greygori - Color gitano - Mix Version: Downloading 0 items
[download] Finished downloading playlist: Greygori - Color gitano - Mix Version
```