From 48fc08b67999e3582bf6a4f1e5423664f0b9c883 Mon Sep 17 00:00:00 2001 From: jevons0411 Date: Thu, 11 Aug 2022 22:47:57 +0800 Subject: [PATCH] Update SrcJuying.js --- SrcJuying.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/SrcJuying.js b/SrcJuying.js index cbb72f17..902f049a 100644 --- a/SrcJuying.js +++ b/SrcJuying.js @@ -244,21 +244,18 @@ function jiekouyiji() { try { var gethtml = request(MY_URL, { headers: { 'User-Agent': api_ua }, timeout:xunmitimeout*1000 }); if(/cms/.test(api_type)&&/<\?xml/.test(gethtml)){ + gethtml = gethtml.replace(/<!\[CDATA\[|\]\]>/g,''); let xmllist = []; let videos = pdfa(gethtml,'list&&video'); for(let i in videos){ let id = String(xpath(videos[i],`//video/id/text()`)).trim(); - let name = String(xpath(videos[i],`//video/name/text()`)).replace(/<!\[CDATA\[|\]\]>/g,''); + let name = String(xpath(videos[i],`//video/name/text()`)).trim(); let pic = String(xpath(videos[i],`//video/pic/text()`)).trim(); - let note = String(xpath(videos[i],`//video/note/text()`)).replace(/<!\[CDATA\[|\]\]>/g,''); + let note = String(xpath(videos[i],`//video/note/text()`)).trim(); let arr = {"vod_id":id,"vod_name":name,"vod_remarks":note,"vod_pic":pic}; let plays = xpathArray(videos[i],`//video/dl/dd/text()`); if(plays.length==1){ - try{ - var play = plays[0].replace(/<!\[CDATA\[|\]\]>/g,''); - }catch(e){ } - } - if(play){ + let play = plays[0]; if(play.indexOf('$')==-1&&play.indexOf('m3u8')>-1){ arr['play'] = play; }