# -*- coding: utf-8 -*- import scrapy from scrapy.selector import Selector from scrapy.http import HtmlResponse from scrapy.selector import XmlXPathSelector class MyxmlSpider(scrapy.Spider): name = "myxml" start_urls = ( ["file:///home/sayth/Downloads/20160123RAND0.xml"] ) def parse(self, response): xpath = XmlXPathSelector(response) for ids in xpath.select('.//race/@id'): print(ids.extract())
Thanks
Sayth
def parse(self, response):for ids in response.xpath('.//race/@id'):...
--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scrapy-users...@googlegroups.com.
To post to this group, send email to scrapy...@googlegroups.com.
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.
Valdir Stumm Junior
|
|