From 12831357f7541e28d7261d3f16b3d47f5c922b18 Mon Sep 17 00:00:00 2001 From: Amniotic3 Date: Tue, 12 Nov 2024 14:17:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=AF=BB=E7=A7=80bookurl?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E8=AE=BF=E9=97=AE=20(#413)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充正则d值、fenlei值匹配,保证可bookurl可访问性 bookDetail.jsp?dxNumber=000030342974&d=7A85DF1EDEFBBEEA4E76958392F25632&fenlei=1605040302 --- Duxiu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duxiu.js b/Duxiu.js index b1349d2..a1931d4 100644 --- a/Duxiu.js +++ b/Duxiu.js @@ -222,7 +222,7 @@ async function scrape(doc, url = doc.location.href) { newItem.number = getField('标准号').replace('-', '—'); break; } - newItem.url = tryMatch(url, /^.+dxNumber=\w+/i) || url; + newItem.url = tryMatch(url, /^.+dxNumber=\w+&d=\w+&fenle=\d+/i) || url; extra.set('original-title', ZU.capitalizeTitle(getField(['外文题名', '标准英文名'])), true); extra.set('genre', getField('专利类型'), true); extra.set('price', getField('原书定价'));