scrapy-plugins / scrapy-dotpersistence

A scrapy extension to sync `.scrapy` folder to an S3 bucket
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

Configuration settings being overwritten? #8

Open pmyteh opened 7 years ago

pmyteh commented 7 years ago

README.rst says that the bucket, access keys etc. can be configured in settings.py, but this doesn't seem to work in practice: whatever the value of the given settings in settings.py, the default ScrapingHub bucket seems to be chosen anyway. I suspect (but do not know) that the settings are being overridden by ScrapingHub.

There are decent reasons to want the option of storing elsewhere; I've been working on some middleware which needs persistent state, and it's difficult to debug if you don't have ready access to the state because it's held in someone else's S3 bucket!

I've had a stab at dealing with this by allowing specific DOTSCRAPY_* override settings (there's something in my fork at pmyteh/scrapy-dotpersistence) but it doesn't seem to be working when deployed to shub. Currently managing OK by subclassing the main class in my project code and substituting a replacement init() method, but that's obviously not ideal in the long run.

rennerocha commented 5 years ago

ADDONS_S3_BUCKET, ADDONS_AWS_ACCESS_KEY_ID and ADDONS_AWS_USERNAME are overridden by Scrapy Cloud, so if you want to set up your own credentials, you need to define them in Scrapy Cloud UI.