问题是您正在重用
HtmlXPathSelector为初始响应定义的内容。从selenium浏览器重新定义它
source_pre:
...for month in months: link = self.br.find_element_by_link_text(month) link.click() time.sleep(5) hxs = HtmlXPathSelector(self.br.page_source) # Get all the divs containing info to be scraped. listitems = hxs.select("//div[@]")...


