From fe7f288b828761d33ac45e2221582473e67542d2 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Wed, 25 Sep 2024 20:05:02 -0500 Subject: [PATCH] android user agent works --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 63a7d32..9f20b55 100644 --- a/main.cpp +++ b/main.cpp @@ -778,8 +778,8 @@ json_t* download_info(VideoId& id) { CURL* curl = curl_easy_init(); 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: Google-Ads-Creatives-Assistant"); + 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,"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\":\"GOOGLE_ASSISTANT\",\"clientVersion\": \"0.1\", \"hl\":\"en\",\"gl\":\"US\",\"utcOffsetMinutes\":0}}}";