This html file
<html>
<head></head>
<body>
<div class="float-r">
<span id="artical_comment_cnt"><i></i>0</span>
<span><i class="view"></i><script src="/cms/plus/count.php?view=yes&aid=20192&mid=17" language="javascript"></script>778</span>
</div>
</body>
</html>
I want get "0" and "778" , my Code is
comments = response.css(".float-r span#artical_comment_cnt::text").extract()[0]
views = response.css("div.float-r span span::text").extract_first().extract()[0]
But result always NULL, how to fix it??
UPDATE
for id artical_comment_cnt is Global only
my answer is
In [2]: response.css("span#artical_comment_cnt::text").extract_first()
Out[2]: '0'
var comments = document.querySelector('.float-r .artical_comment_cnt').innerText