From 7d4a099eeef308b2a5e9987ba6871e6a3b26cef6 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Fri, 6 Sep 2024 14:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyPublic.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyPublic.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SrcJyPublic.js b/SrcJyPublic.js index 2c6d29bd..59f351ee 100644 --- a/SrcJyPublic.js +++ b/SrcJyPublic.js @@ -339,13 +339,17 @@ function getContnet(url) { let proxys = $.require('ghproxy').getproxy(); shuffleArray(proxys); for(let i=0;i') && !content.startsWith('') && !/502 Bad Gateway/.test(content)) { return content; } } } - return fetch(url, {timeout:20000}); + let headers = { 'User-Agent': MOBILE_UA }; + if(!url.endsWith('.json')){ + headers['User-Agent'] = 'okhttp/4.12.0'; + } + return fetch(url, {headers: headers, timeout:20000}); } //获取分组接口列表 function getGroupLists(datas, k) {