Make the equivalent to a text request on youtube using python

20 Views Asked by At

I would like to make a text request using the youtube api. For example i'm looking for all the videos that are related to 'frogs' and i would like to download the 10 first videos.

I already know how to download but i need a list of URL. i was thinking about something like this :

def get_url(string, url_number):
   liste_url = youtube.request(string)[:url_number]
   return liste_url 

Thanks

1

There are 1 best solutions below

0
Magic Mushroom On
from youtubesearchpython import VideosSearch

videosSearch = VideosSearch('text', limit = 2)