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])
| 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"): |
no test coverage detected