We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am crawling a property site and when there are no properties on the site, the existing json on the disk is not being overwritten.
How to ensure that JSON is written irrespective of records found or not.
The text was updated successfully, but these errors were encountered:
The workaround is to create empty JSON before crawling open_spider callback
open_spider
# Empty file before start crawling def self.open_spider File.open('path/to/output.json', 'w') { |file| file.write([].to_s) } end
Sorry, something went wrong.
No branches or pull requests
I am crawling a property site and when there are no properties on the site, the existing json on the disk is not being overwritten.
How to ensure that JSON is written irrespective of records found or not.
The text was updated successfully, but these errors were encountered: