Repository: yt-dlp
Issue: Limit request pagination instead of the number of entries retrieved in playlist?
Labels: enhancement,core:extractor

### 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 asking a question and **not** reporting a bug or requesting a feature
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I'm running yt-dlp version **2023.06.22** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [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 questions **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)

### Please make sure the question is worded well enough to be understood

In a GUI I'm writing, I want to be able to cross-reference media from one site to another, and I current have it set to retrieve 20 search results from YouTube and sort those out based on what might be the highest chance of being the equivalent of the original media. But I noticed that it downloads 2 pages to get these each time, which might be a LOT of requests to the site when downloading multiple pieces of media and could flag the user's network.

Is it possible to limit the pagination to the first page (or maybe a range of pages) when retrieving data of, say, a YouTube playlist? I understand that you can use `--playlist-end` to limit the amount of results in a playlist is retrieved, but what about limiting the amount of entire pages that a site returns? I'd feel much better downloading a single page of a playlist than using a hardcoded number to try to "mitigate" the amount of requests made.

### 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] Override config: ['-vU']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out charmap, error charmap, screen charmap
[debug] yt-dlp version stable@2023.06.22 [812cdfa06] (win_exe) API
[debug] params: {'usenetrc': False, 'netrc_location': None, 'netrc_cmd': None, 'username': None, 'password': None, 'twofactor': None, 'videopassword': None, 'ap_mso': None, 'ap_username': None, 'ap_password': None, 'client_certificate': None, 'client_certificate_key': None, 'client_certificate_password': None, 'quiet': False, 'no_warnings': False, 'forceurl': False, 'forcetitle': False, 'forceid': False, 'forcethumbnail': False, 'forcedescription': False, 'forceduration': False, 'forcefilename': False, 'forceformat': False, 'forceprint': {}, 'print_to_file': {}, 'forcejson': False, 'dump_single_json': False, 'force_write_download_archive': False, 'simulate': None, 'skip_download': False, 'format': None, 'allow_unplayable_formats': False, 'ignore_no_formats_error': False, 'format_sort': [], 'format_sort_force': False, 'allow_multiple_video_streams': False, 'allow_multiple_audio_streams': False, 'check_formats': None, 'listformats': None, 'listformats_table': True, 'outtmpl': {}, 'outtmpl_na_placeholder': 'NA', 'paths': {}, 'autonumber_size': None, 'autonumber_start': 1, 'restrictfilenames': False, 'windowsfilenames': False, 'ignoreerrors': 'only_download', 'force_generic_extractor': False, 'allowed_extractors': ['default'], 'ratelimit': None, 'throttledratelimit': None, 'overwrites': None, 'retries': 10, 'file_access_retries': 3, 'fragment_retries': 10, 'extractor_retries': 3, 'retry_sleep_functions': {}, 'skip_unavailable_fragments': True, 'keep_fragments': False, 'concurrent_fragment_downloads': 1, 'buffersize': 1024, 'noresizebuffer': False, 'http_chunk_size': None, 'continuedl': True, 'noprogress': False, 'progress_with_newline': True, 'progress_template': {}, 'playliststart': 1, 'playlistend': None, 'playlistreverse': None, 'playlistrandom': None, 'lazy_playlist': None, 'noplaylist': False, 'logtostderr': False, 'consoletitle': False, 'nopart': False, 'updatetime': True, 'writedescription': False, 'writeannotations': False, 'writeinfojson': None, 'allow_playlist_files': True, 'clean_infojson': True, 'getcomments': False, 'writethumbnail': False, 'write_all_thumbnails': False, 'writelink': False, 'writeurllink': False, 'writewebloclink': False, 'writedesktoplink': False, 'writesubtitles': False, 'writeautomaticsub': False, 'allsubtitles': False, 'listsubtitles': False, 'subtitlesformat': 'best', 'subtitleslangs': [], 'matchtitle': None, 'rejecttitle': None, 'max_downloads': None, 'prefer_free_formats': False, 'trim_file_name': 0, 'verbose': True, 'dump_intermediate_pages': False, 'write_pages': False, 'load_pages': False, 'test': False, 'keepvideo': False, 'min_filesize': None, 'max_filesize': None, 'min_views': None, 'max_views': None, 'daterange': yt_dlp.utils.DateRange('0001-01-01', '9999-12-31'), 'cachedir': None, 'youtube_print_sig_code': False, 'age_limit': None, 'download_archive': None, 'break_on_existing': False, 'break_on_reject': False, 'break_per_url': False, 'skip_playlist_after_errors': None, 'cookiefile': None, 'cookiesfrombrowser': None, 'legacyserverconnect': False, 'nocheckcertificate': False, 'prefer_insecure': None, 'enable_file_urls': False, 'http_headers': {}, 'proxy': None, 'socket_timeout': None, 'bidi_workaround': None, 'debug_printtraffic': False, 'prefer_ffmpeg': True, 'include_ads': None, 'default_search': None, 'dynamic_mpd': True, 'extractor_args': {}, 'youtube_include_dash_manifest': True, 'youtube_include_hls_manifest': True, 'encoding': None, 'extract_flat': 'discard_in_playlist', 'live_from_start': None, 'wait_for_video': None, 'mark_watched': False, 'merge_output_format': None, 'final_ext': None, 'postprocessors': [{'key': 'FFmpegConcat', 'only_multi_video': True, 'when': 'playlist'}], 'fixup': None, 'source_address': None, 'call_home': False, 'sleep_interval_requests': None, 'sleep_interval': None, 'max_sleep_interval': None, 'sleep_interval_subtitles': 0, 'external_downloader': {}, 'download_ranges': yt_dlp.utils.download_range_func([], []), 'force_keyframes_at_cuts': False, 'list_thumbnails': False, 'playlist_items': None, 'xattr_set_filesize': None, 'match_filter': None, 'color': {}, 'ffmpeg_location': None, 'hls_prefer_native': None, 'hls_use_mpegts': None, 'hls_split_discontinuity': False, 'external_downloader_args': {}, 'postprocessor_args': {}, 'cn_verification_proxy': None, 'geo_verification_proxy': None, 'geo_bypass': True, 'geo_bypass_country': None, 'geo_bypass_ip_block': None, '_warnings': [], '_deprecation_warnings': [], 'compat_opts': set(), 'progress_hooks': [<c.progressHook.progressHook object at 0x000001BEF1CAAE90>]}
[debug] Lazy loading extractors is disabled
[debug] Python 3.11.4 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1u  30 May 2023)
[debug] exe versions: none
[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 1851 extractors
```