From d06c583b37ace386fbb4b5227b3615bf1d758fb1 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 30 May 2024 16:32:53 +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 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/SrcJyData.js b/SrcJyData.js index 14bf5ebf..5468d11b 100644 --- a/SrcJyData.js +++ b/SrcJyData.js @@ -535,20 +535,23 @@ function getYiData(jkdata) { MY_URL = MY_URL + '&t=' + type_id; } } - log('1'); + let gethtml = request(MY_URL, { headers: headers, timeout:5000 }); - log('2'); + if(api_type=="drpy"){ let id,name,pic,note let dws = extdata["一级"].split(';'); let vodlist = _pdfa(gethtml, dws[0]); - log('3'); vodlist.forEach(it=>{ - id = _pd(it, dws[4], MY_URL); - name = _pdfh(it, dws[1]); - pic = _pdfh(it, dws[2]); - note = _pdfh(it, dws[3]); - lists.push({"vod_id":id,"vod_name":name,"vod_remarks":note,"vod_pic":pic}); + try{ + id = _pd(it, dws[4], MY_URL); + name = _pdfh(it, dws[1]); + pic = _pdfh(it, dws[2]); + note = _pdfh(it, dws[3]); + lists.push({"vod_id":id,"vod_name":name,"vod_remarks":note,"vod_pic":pic}); + }catch(e){ + log('生成列表有错误>'+e.message + " 错误行#" + e.lineNumber); + } }) }else if(api_type=="XBPQ"){ extdata["二次截取"] = extdata["二次截取"] || (gethtml.indexOf(`