(self, request, response)
| 11 | yield feapder.Request("https://news.qq.com/#{}".format(i), render=True) |
| 12 | |
| 13 | def parse(self, request, response): |
| 14 | print(response.cookies.get_dict()) |
| 15 | print("response.url ", response.url) |
| 16 | |
| 17 | article_list = response.xpath('//div[@class="detail"]') |
| 18 | for article in article_list: |
| 19 | title = article.xpath("string(.//a)").extract_first() |
| 20 | print(title) |
| 21 | |
| 22 | |
| 23 | if __name__ == "__main__": |