Zotero translator中文网页抓取翻译器🎉This is Zotero translators for Chinese Sites(beta), not the official Zotero repo
GNU Affero General Public License v3.0
3.98k
stars
521
forks
source link
The regexp in target contains the error #351
Closed
northword closed 1 month ago
背景 [必填]
以 bilibili.js 为例,目前其 target 为
https?://(search|www).bilibili.com
,new RegExp
后为/https?:\/\/(search|www).bilibili.com/
,而期望中应该是/https?:\/\/(search|www)\.bilibili\.com/
否则网址会匹配错误:
此外,第一个捕获组应该是 0-1 次,因此 target 应为
https?://(search|www)?\.bilibili\.com
此仓库有不少转换器都存在这个问题。
你的想法 [必填]
参照官方格式修改,例如:https://github.com/zotero/translators/blob/master/ABC%20News%20Australia.js#L5