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
3.98k stars 521 forks source link

Baidu Baike/百度百科搜索 #355

Closed doubanchan closed 2 weeks ago

doubanchan commented 1 month ago

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

发生问题的链接 [必填] 天气(搜索界面)

问题描述 [必填] 搜索页未区分条目中的章节。

你的预期结果 去除章节。

其他 var rows = doc.querySelectorAll('a.title_haXVw[href*="/item/"]') 使用这段代码似乎未抓到元素,错误在哪?

doubanchan commented 3 weeks ago

发现搜索界面title_xx后的的xx每次不固定。

var rows = doc.querySelectorAll('a[class^="title_"][href*="/item/"]'); 也是不行。

doubanchan commented 1 week ago

@jiaojiaodubai 试了下,无法识别。const rows = doc.querySelectorAll('a[class^="title_"][href*="/item/"]');,在Scaffold上测试rows.length为0,但是在普通浏览器(Chrome)中rows.length大于0(能正常获得).不清楚Zotero是怎么回事。