scrapy/scrapy — pull request #882 by ahlen (2014-09-13 02:10:53+00:00)
Title: Allow to specify the quotechar in CSVFeedSpider

Hi,

this PR make it possible to pass a quotechar to the csviter (and csv.reader) and specify which enclosing/quoting character to use in the CSVFeedSpider. Today it is only possible to set a custom delimiter [1] but no other parameters to the csv.reader and a question may also be if it is enough with quotechar or if the csviter should expose more, like dialects [2] to be even more generic.

This solves a scenario when a CSV file use any other quoting character than the default (`"`, quotation mark), such as the single quote `'`. Without this the keys and values will be enclosed by the single quote, e.g. `u"'key'"`.

[1] http://doc.scrapy.org/en/latest/topics/spiders.html#csvfeedspider
[2] https://docs.python.org/2/library/csv.html#csv.reader