Python scrapy.selector() Examples
The following are 1
code examples of scrapy.selector().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
scrapy
, or try the search function
.
Example #1
Source File: orf_at.py From PyFeeds with GNU Affero General Public License v3.0 | 5 votes |
def parse(self, response): selector = Selector(response, type="xml") doc = lxml.etree.ElementTree(lxml.etree.fromstring(response.body)) if doc.getroot().nsmap: self._register_namespaces(selector) nodes = selector.xpath("//%s" % self.itertag) else: nodes = selector.xpath("//item") return self.parse_nodes(response, nodes)