在1行代码中选择类型为nth的标签,不能使用nth-child

时间:2018-10-27 19:13:32

标签: css

我正在尝试进行CSS选择,以从无法编辑的网页中抓取温度数据。完整的代码如下:

import re
reg = r"[sS]?[aA]?[mM]?[uU]?[eE]?[lL]?"
re.match(reg, "samuel")  # Match
re.match(reg, "sml")  # Match
re.match(reg, "123sam")  # Doesn't match
re.match(reg, "zzzSAmu")  # Doesn't match

我在下面的页面进行了调试,在这种情况下,我试图将温度值设为红色。 nth-child(3)可以工作,但是我的刮板不支持它,有没有办法做到这一点?奇怪的是,<b>handler.setget(<tt>%sen-1</tt>)</b><br><tt>23.150</tt> 可与我的调试器一起使用,但在我的刮板上不起作用。

有什么想法吗?

body>tt:nth-of-type(1)
tt:nth-of-type(1) {
  background: red;
}

0 个答案:

没有答案