class documentation

class CSVFeedSpider(Spider): (source)

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 adapt_response This method has the same purpose as the one in XMLFeedSpider
Method parse_row This method must be overridden with your custom spider functionality
Method parse_rows 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.
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
Method _parse 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 __repr__ Undocumented
Method log Log the given message at the given log level
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
Method _set_crawler Undocumented

Inherited from object_ref (via Spider):

Method __new__ Undocumented
Class Variable __slots__ Undocumented
def adapt_response(self, response): (source)

This method has the same purpose as the one in XMLFeedSpider

def parse_row(self, response, row): (source)

This method must be overridden with your custom spider functionality

def parse_rows(self, response): (source)

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): (source)

This method has the same purpose as the one in XMLFeedSpider

delimiter = (source)

Undocumented

Undocumented

quotechar = (source)

Undocumented

def _parse(self, response, **kwargs): (source)

Undocumented