Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

hemamaps / Scrapy   python

Repository URL to install this package:

Version: 1.1.1 

/ templates / spiders / xmlfeed.tmpl

# -*- coding: utf-8 -*-
from scrapy.spiders import XMLFeedSpider


class $classname(XMLFeedSpider):
    name = '$name'
    allowed_domains = ['$domain']
    start_urls = ['http://www.$domain/feed.xml']
    iterator = 'iternodes' # you can change this; see the docs
    itertag = 'item' # change it accordingly

    def parse_node(self, response, selector):
        i = {}
        #i['url'] = selector.select('url').extract()
        #i['name'] = selector.select('name').extract()
        #i['description'] = selector.select('description').extract()
        return i