android user agent works

This commit is contained in:
Mike Nolan 2024-09-25 20:05:02 -05:00
parent 0ee16bf952
commit fe7f288b82
1 changed files with 2 additions and 2 deletions

View File

@ -778,8 +778,8 @@ json_t* download_info(VideoId& id)
{ {
CURL* curl = curl_easy_init(); CURL* curl = curl_easy_init();
struct curl_slist *headers = curl_slist_append(NULL, "Content-Type: application/json"); struct curl_slist *headers = curl_slist_append(NULL, "Content-Type: application/json");
//curl_slist_append(headers, "User-Agent: com.google.android.youtube/17.36.4 (Linux; U; Android 12; GB) gzip"); curl_slist_append(headers, "User-Agent: com.google.android.youtube/17.36.4 (Linux; U; Android 12; GB) gzip");
curl_slist_append(headers,"User-Agent: Google-Ads-Creatives-Assistant"); //curl_slist_append(headers,"User-Agent: Google-Ads-Creatives-Assistant");
curl_slist_append(headers,"SOCS: CAISEwgDEgk2NzM5OTg2ODUaAmVuIAEaBgiA6p23Bg"); curl_slist_append(headers,"SOCS: CAISEwgDEgk2NzM5OTg2ODUaAmVuIAEaBgiA6p23Bg");
//std::string json= "{\"videoId\":\"" + id.Value() +"\",\"context\":{\"client\":{\"clientName\":\"ANDROID_TESTSUITE\",\"clientVersion\": \"1.9\",\"androidSdkVersion\":30, \"hl\":\"en\",\"gl\":\"US\",\"utcOffsetMinutes\":0}}}"; //std::string json= "{\"videoId\":\"" + id.Value() +"\",\"context\":{\"client\":{\"clientName\":\"ANDROID_TESTSUITE\",\"clientVersion\": \"1.9\",\"androidSdkVersion\":30, \"hl\":\"en\",\"gl\":\"US\",\"utcOffsetMinutes\":0}}}";
std::string json= "{\"videoId\":\"" + id.Value() +"\",\"context\":{\"client\":{\"clientName\":\"GOOGLE_ASSISTANT\",\"clientVersion\": \"0.1\", \"hl\":\"en\",\"gl\":\"US\",\"utcOffsetMinutes\":0}}}"; std::string json= "{\"videoId\":\"" + id.Value() +"\",\"context\":{\"client\":{\"clientName\":\"GOOGLE_ASSISTANT\",\"clientVersion\": \"0.1\", \"hl\":\"en\",\"gl\":\"US\",\"utcOffsetMinutes\":0}}}";