From 188210cd238cf5836c1b526d0854de722a1163e5 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Tue, 4 Jun 2024 11:49:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyData.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyData.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/SrcJyData.js b/SrcJyData.js index 5909748e..93e330ca 100644 --- a/SrcJyData.js +++ b/SrcJyData.js @@ -1275,14 +1275,14 @@ function getErData(jkdata) { // 获取网页源码 function getHtml(url, headers) { headers = headers || {}; - let html = request(url, {headers: headers, timeout: 1, withStatusCode:true}); - log(html); - let json = JSON.parse(html); - if(json.statusCode==200){ - return json.body; - }else{ - return ''; - } + let html = request(url, {headers: headers, timeout: timeout, withStatusCode:true}); + try{ + let json = JSON.parse(html); + if(json.statusCode==200){ + return json.body; + } + }catch(e){} + return ''; } // extData缓存 function extDataCache(jkdata) {