l0o0 / translators_CN

Zotero translator中文网页抓取翻译器🎉This is Zotero translators for Chinese Sites(beta), not the official Zotero repo
GNU Affero General Public License v3.0
4.03k stars 523 forks source link

国家科技图书文献中心/National Science and Technology Library/NSTL #307

Closed doubanchan closed 5 months ago

doubanchan commented 7 months ago

你遇到了什么问题? [必填]

发生问题的链接 [必填] 链接

问题描述 [必填] 如:“作者”字段没有分开。 在Firefox、Chrome均未识别;在编辑器Scaffold上“TranslatorTester: National Science and Technology Library - China Test 1: failed (Detection failed)

你的预期结果 如:“作者”名字应该分开。

浏览器

自查清单

其他 似乎无有效的调试信息;否能解释下detectWeb,不了解monitorDOMChanges。

jiaojiaodubai commented 7 months ago

Edge 未能复现以上错误。 image image

doubanchan commented 7 months ago

加了一行 Z.debug( typeof zhType );,Scaffold中结果是 undefined https://github.com/l0o0/translators_CN/blob/441258e74df898791b7d27f56a250426688189f0/National%20Science%20and%20Technology%20Library%20-%20China.js#L56

jiaojiaodubai commented 7 months ago

否能解释下detectWeb,不了解monitorDOMChanges。

monitorDOMChanges(),第一个参数是要监测的Element,第二个参数是监测属性,当第一个参数的Element发生第二个参数所描述的变化时,再次触发detectWeb()重新判断页面类型,用于在动态加载的页面等待相关元素加载出来。

jiaojiaodubai commented 7 months ago

在Firefox、Chrome均未识别;在编辑器Scaffold上“TranslatorTester: National Science and Technology Library - China Test 1: failed (Detection failed) 加了一行 Z.debug( typeof zhType );,Scaffold中结果是 undefined

说明在你的页面中未获取到“期刊论文”这几个字,你打开dev tools看一下,标题前面的“【期刊论文】”这几个字应该是什么selector

jiaojiaodubai commented 6 months ago

@doubanchan 这个问题还存在吗?