python爬虫中用xpath无法获取某些标签问题
selenium 斗鱼直播页面
某个div标签下面的img标签在代码中无法用xpath获取到
xpath路径没有问题
代码中无法找到报错
def prase_data(self):
room_list = self.driver.find_elements_by_xpath('//*[@id="listAll"]/section[2]/div[2]/ul/li/div')
#print(len(room_list))
for room in room_list:
temp = {}
temp['title'] = room.find_element_by_xpath('./a[1]/div[2]/div[1]/h3').text
temp['type'] = room.find_element_by_xpath('./a[1]/div[2]/div[1]/span').text
temp['owner