1
mirror of https://github.com/revanced/revanced-integrations synced 2024-11-27 11:13:38 +01:00

fix(youtube/sponsorblock): update HTTP user agent (#344)

This commit is contained in:
LisoUseInAIKyrios 2023-04-02 22:46:25 +04:00 committed by oSumAtrIX
parent e3529cfcec
commit 3025103014
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -19,8 +19,7 @@ public class Requester {
String url = apiUrl + route.compile(params).getCompiledRoute(); String url = apiUrl + route.compile(params).getCompiledRoute();
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setRequestMethod(route.getMethod().name()); connection.setRequestMethod(route.getMethod().name());
// TODO: change the user agent string connection.setRequestProperty("User-agent", System.getProperty("http.agent") + ";revanced");
connection.setRequestProperty("User-agent", System.getProperty("http.agent") + ";vanced");
return connection; return connection;
} }