Make a get request specifying the name of the video you want
https://youtubesearcher.vercel.app/search?q={name}
Example - https://youtubesearcher.vercel.app/search?q=flask
The response JSON Object looks something like this -
{
"query": "flask",
"total results": 17,
"videos": [
{
"channel": "freeCodeCamp.org",
"description": "Flask",
"duration": "46:59",
"id": "Z1RJmh_OqeA",
"thumbnails": [
"https://i.ytimg.com/vi/Z1RJmh_OqeA/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLAuToT2WhtYyxoNenChum3vaPINkA",
"https://i.ytimg.com/vi/Z1RJmh_OqeA/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD2_JIwPHoglSsUNAukZpYjypohRQ"
],
"title": "Learn Flask for Python - Full Tutorial",
"url": "https://youtube.com/watch?v=Z1RJmh_OqeA",
"views": "395,156 views"
}
]
}
Install all dependencies listed in requirements.txt file.
-
To install all dependencies run -
$ sudo -H pip3 install -r requirements.txt
-
Start the server
$ python app.py