MCPcopy
hub / github.com/scrapy/scrapy / parse_nodes

Method parse_nodes

scrapy/spiders/feed.py:62–72  ·  scrapy/spiders/feed.py::XMLFeedSpider.parse_nodes

This method is called for the nodes matching the provided tag name (itertag). Receives the response and an Selector for each node. Overriding this method is mandatory. Otherwise, you spider won't work. This method must return either an item, a request, or a list conta

(self, response: Response, nodes: Iterable[Selector])

Source from the content-addressed store, hash-verified

60 raise NotImplementedError
61
62 def parse_nodes(self, response: Response, nodes: Iterable[Selector]) -> Any:
63 class="st">"""This method is called for the nodes matching the provided tag name
64 (itertag). Receives the response and an Selector for each node.
65 Overriding this method is mandatory. Otherwise, you spider won&class="cm">#x27;t work.
66 This method must return either an item, a request, or a list
67 containing any of them.
68 class="st">"""
69
70 for selector in nodes:
71 ret = iterate_spider_output(self.parse_node(response, selector))
72 yield from self.process_results(response, ret)
73
74 def _parse(self, response: Response, **kwargs: Any) -> Any:
75 if not hasattr(self, class="st">"parse_node"):

Callers 1

_parseMethod · 0.95

Calls 3

parse_nodeMethod · 0.95
process_resultsMethod · 0.95
iterate_spider_outputFunction · 0.90

Tested by

no test coverage detected