class documentation

class CSVFeedSpider(Spider):

View In Hierarchy

Spider for parsing CSV feeds. It receives a CSV file in a response; iterates through each of its rows, and calls parse_row with a dict containing each field's data.

You can set some options regarding the CSV file, such as the delimiter, quotechar and the file's headers.

Method ​_parse Undocumented
Method adapt​_response This method has the same purpose as the one in XMLFeedSpider
Method parse​_row This method must be overriden with your custom spider functionality
Method parse​_rows No summary
Method process​_results This method has the same purpose as the one in XMLFeedSpider
Class Variable delimiter Undocumented
Class Variable headers Undocumented
Class Variable quotechar Undocumented

Inherited from Spider:

Class Method from​_crawler Undocumented
Class Method handles​_request Undocumented
Class Method update​_settings Undocumented
Static Method close Undocumented
Method __init__ Undocumented
Method __str__ Undocumented
Method ​_set​_crawler Undocumented
Method log Log the given message at the given log level
Method make​_requests​_from​_url This method is deprecated.
Method parse Undocumented
Method start​_requests Undocumented
Class Variable custom​_settings Undocumented
Instance Variable crawler Undocumented
Instance Variable name Undocumented
Instance Variable settings Undocumented
Instance Variable start​_urls Undocumented
Property logger Undocumented

Inherited from object_ref (via Spider):

Method __new__ Undocumented
Class Variable __slots__ Undocumented
def _parse(self, response, **kwargs):

Undocumented

def adapt_response(self, response):
This method has the same purpose as the one in XMLFeedSpider
def parse_row(self, response, row):
This method must be overriden with your custom spider functionality
def parse_rows(self, response):
Receives a response and a dict (representing each row) with a key for each provided (or detected) header of the CSV file. This spider also gives the opportunity to override adapt_response and process_results methods for pre and post-processing purposes.
def process_results(self, response, results):
This method has the same purpose as the one in XMLFeedSpider
delimiter =

Undocumented

headers =

Undocumented

quotechar =

Undocumented