精易论坛
标题:
e2ee网页内容解析问题,first-child和nth-child()选择器异常
[打印本页]
作者:
Canada
时间:
2023-5-3 15:32
标题:
e2ee网页内容解析问题,first-child和nth-child()选择器异常
本帖最后由 Canada 于 2023-5-3 15:35 编辑
[attach]1256147[/attach][attach]1256148[/attach]
解析的是这个地址
https://www.op.gg/modes/urf/zeri/runes?region=global
#content-container > main > div.css-1qtfvu5.eepin730 > div:nth-child(2) > section > table > tbody > tr:first-child > td 这个选择器正常
但在最后的td 后面加上:first-child 就取不到,last-child就可以,nth-child(2)取出来的好像是first-child的内容,nth-child(1)和nth-child(3)都取不到
@神2
作者:
8881020
时间:
2023-5-3 16:08
那就用原生JS搞
作者:
8881020
时间:
2023-5-3 16:08
table 看看有没有标签 tbody 也看看有没有 ID 或者class
作者:
Canada
时间:
2023-5-3 16:32
8881020 发表于 2023-5-3 16:08
table 看看有没有标签 tbody 也看看有没有 ID 或者class
指定td的class是可以,但我就是反馈这个问题
欢迎光临 精易论坛 (https://125.confly.eu.org/)
Powered by Discuz! X3.4