CsvItemExporter for multiple files in custom item pipeline not exporting all items
问题 I have created an item pipeline as an answer to this question. It is supposed to create a new file for every page according to the page_no value set in the item. This works mostly fine. The problem is with the last csv file generated by the pipeline/item exporter, page-10.csv . The last 10 values are not exported, so the file stays empty. What could be the reason for this behaviour? pipelines.py from scrapy.exporters import CsvItemExporter class PerFilenameExportPipeline: """Distribute items