From 49ea9085779d2956b4bbe3d76692c56735b08ced Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Wed, 22 Mar 2023 14:55:27 +0700 Subject: [PATCH] change user agent for funny --- .../me/chayapak1/chomensbot_mabe/util/DownloadUtilities.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/chayapak1/chomensbot_mabe/util/DownloadUtilities.java b/src/main/java/me/chayapak1/chomensbot_mabe/util/DownloadUtilities.java index d1b0f53..3cfe248 100644 --- a/src/main/java/me/chayapak1/chomensbot_mabe/util/DownloadUtilities.java +++ b/src/main/java/me/chayapak1/chomensbot_mabe/util/DownloadUtilities.java @@ -33,7 +33,8 @@ public class DownloadUtilities { URLConnection conn = url.openConnection(); conn.setConnectTimeout(5000); conn.setReadTimeout(10000); - conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0"); + // https://www.whatismybrowser.com/guides/the-latest-user-agent/windows + conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"); try (BufferedInputStream downloadStream = new BufferedInputStream(conn.getInputStream())) { ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream();