Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this C++ program and my goal is that i will enter a string and then my program will automatically look for that string in the youtube and list me the videos. But i am facing some problems- I am using the system() to open the youtube link and i dont know how i can pass my string in the youtube search query. I think i can better explain this with my code- Here is my code.

string I;

cout<<"Enter i"<<endl;
getline(cin,I);

if(I =="r")
{
system("start https://www.youtube.com/results?search_query=r");


}

Here is the problem, i want my program to automatically pass the sting i entered in the youtube search link . I mean to say that whatever string i enter should automatically be passed on to (search_query = string entered).
I am not being able to do that. Is there a way to do that?

Thanks
Posted

1 solution

Simply use the YouTube API:
https://developers.google.com/youtube/[^]

I suggest you use .NET:
https://developers.google.com/youtube/v3/code_samples/dotnet#search_by_keyword[^]

All this and much more is available via a simple Google search.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900