我试图使用Selenium
从评论中提取星级,html标记如下:
<p class="inlineRating starRating"><span class="current-rating" style="width: 80%">
Current Rating: 4</span></p>
我用selenium
做了这个
^{pr2}$
我经常得到的输出是:
Current Rating: 0
我也尝试过xpath
方法,scrapy在给页面加外壳时遇到了困难,我正在用python
编写代码。请帮忙。在
页面url:http://www.webmd.com/drugs/drugreview-19924-cyclophosphamide+intravenous.aspx?drugid=19924&drugname=cyclophosphamide+intravenous&sortby=3
Tags:
因为有多个评论driver.find_element_css_选择器()打电话可能返回的评论与你想象的不同。你需要先找到评审人,然后才能得到评审。比如should work(如果Python循环正确的话):
为特定评审员寻找有效性星级的xpath是:
你可以对其他类别做同样的事情。。。在
相关问题 更多 >
编程相关推荐