4

I tried

youtube-dl 'ytsearch:football'

but this command downloads only the first video in the top of search results.

How to download the top 10 search result ?

Zanna
  • 70,465
Ublim
  • 59
  • 1
    Add the number of results you want at the end of the extractor, i.e. ytsearch10. You can also use all (as in ytsearchall) to download all search results. Ref: u/Rhomboid post in https://redd.it/3q1wfl. – efotinis Dec 07 '19 at 09:32

1 Answers1

2

Using the option --playlist-items ITEM_SPEC should do what you want.

That gives you a playlist of video items to download. Specify indices of the videos in the playlist separated by commas like: --playlist-items 1-10 to download videos 1-10 in the playlist.

That, and other options, are described here on the youtubedl GitHub page.

Zanna
  • 70,465
K7AAY
  • 17,202
  • [youtube:search] query "football": Downloading page 1 [download] Downloading playlist: football [youtube:search] playlist football: Collected 1 video ids (downloading 1 of them) [download] Downloading video 1 of 1 [youtube] RAQQX36j_A0: Downloading webpage [youtube] RAQQX36j_A0: Downloading video info webpage [youtube] RAQQX36j_A0: Extracting video information WARNING: Requested formats are incompatible for merge and will be merged into mkv. – Ublim May 24 '18 at 13:22
  • This does not work with ytsearch. Solution: Append a number to ytsearch such as ytsearch10 – nathanfranke May 11 '21 at 08:36