Scrapy, a fast high-level web crawling & scraping framework for Python.
Fix for CSV export unnecessary blank lines problem on Windows (#3039)
Oz T6f5c39d65f3e
diff --git a/scrapy/exporters.py b/scrapy/exporters.pyindex 07f43b494..695c74fec 100644--- a/scrapy/exporters.py+++ b/scrapy/exporters.py@@ -214,7 +214,8 @@ class CsvItemExporter(BaseItemExporter):file,line_buffering=False,write_through=True,- encoding=self.encoding+ encoding=self.encoding,+ newline='' # Windows needs this https://github.com/scrapy/scrapy/issues/3034) if six.PY3 else fileself.csv_writer = csv.writer(self.stream, **kwargs)self._headers_not_written = True