0

If I do

$ yt-dlp ytsearch:"some query"

yt-dlp downloads the first result of "some query" and everything is fine. What if I want to download the second result, how can I achieve that?

If it is not possible just using shell, how can I do it with python.

berinaniesh
  • 198
  • 13

1 Answers1

0

The second result can be downloaded with ytsearch2. But the problem is that ytsearch2 downloads two videos. But conveniently, youtube-dl (yt-dlp) has an option to get the nth video with -I n. So the command becomes

$ yt-dlp -I 2 ytsearch2:"some query"
berinaniesh
  • 198
  • 13