Cheerio 和 css 选择器
Cheerio and css selector
您好,我正在尝试 select 或 select 来自
的号码 332
<div data-stat="PVPMatchesWon" class="trn-defstat__value">
332
</div>
但我不知道该怎么做...我正在尝试使用 Cheerio 和 Jquery 但它不起作用...
let wins = $(`div.trn-defstat--large:nth-child(1) > div:nth-child(2)`).text()
( div.trn-defstat--large:nth-child(1) > div:nth-child(2) )
这是 css select or.
我知道我的问题对某些人来说很简单,但我还是卡住了。
可能只是:
$('[data-stat="PVPMatchesWon"]').text()
我怀疑还有另一个。
您好,我正在尝试 select 或 select 来自
的号码 332<div data-stat="PVPMatchesWon" class="trn-defstat__value">
332
</div>
但我不知道该怎么做...我正在尝试使用 Cheerio 和 Jquery 但它不起作用...
let wins = $(`div.trn-defstat--large:nth-child(1) > div:nth-child(2)`).text()
( div.trn-defstat--large:nth-child(1) > div:nth-child(2) )
这是 css select or.
我知道我的问题对某些人来说很简单,但我还是卡住了。
可能只是:
$('[data-stat="PVPMatchesWon"]').text()
我怀疑还有另一个。