Is there a way for me to get the url of a youtube video when a user type the name of the video in an input? trying to do it in my discord bot
what I have tried so far:
query = message.content.split(" ")[1:]
url = "http://www.youtube.com/results?search_query="
for word in query:
url += word + "+"
link = webbrowser.open_new(url)
yt = YouTube(str(link))
so I used webbrowser
to see the bot's perspective after adding a query to the search link (url)
so it just opens a page with all the videos related to the query, now how do I make it select a certain video (most likely will always be the 1st one on the page)