MCPcopy Create free account
hub / github.com/Boris-code/feapder / parse

Method parse

tests/test_rander2.py:13–20  ·  view source on GitHub ↗
(self, request, response)

Source from the content-addressed store, hash-verified

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
23if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

xpathMethod · 0.80

Tested by

no test coverage detected