Skip to content

Commit

Permalink
修复 读秀bookurl不可访问 (#413)
Browse files Browse the repository at this point in the history
补充正则d值、fenlei值匹配,保证可bookurl可访问性

bookDetail.jsp?dxNumber=000030342974&d=7A85DF1EDEFBBEEA4E76958392F25632&fenlei=1605040302
  • Loading branch information
Amniotic3 authored Nov 12, 2024
1 parent dc8ab60 commit 1283135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Duxiu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('原书定价'));
Expand Down

0 comments on commit 1283135

Please sign in to comment.