Skip to content

Commit 86fc299

Browse files
committed
Update Utils.java
change the user agent again, because last time have error.
1 parent 633bad7 commit 86fc299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/YouTubeSearchApi/utility/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class Utils {
2020
*/
2121
public static String httpRequest(String url) throws IOException {
2222
URLConnection connection = new URL(url).openConnection();
23-
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2");
23+
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36");
2424
connection.connect();
2525

2626
InputStreamReader inputStreamReader = new InputStreamReader(connection.getInputStream(),

0 commit comments

Comments
 (0)