New issue
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
get_project_settings of doesn't reflect per-spider settings #2378
Comments
You need to put |
@IAlwaysBeCoding - Thanks for the correction on Looking again at the documentation, I can see that the "project settings" is what actually the name for the settings.py settings. Given that, your information does make sense, though the documentation could benefit from spelling that out explicitly. |
@mohmad-null , what would you change to https://doc.scrapy.org/en/latest/topics/settings.html#project-settings-module ? |
@redapple https://doc.scrapy.org/en/latest/topics/practices.html (which seems to be the documentation for "get_project_settings" - it's not documented on either the settings page or the api page) - I'd mention that settings loaded this way are not updated globally (so it can't be used in conjunction with os.environ['SCRAPY_SETTINGS_MODULE'] = 'myproject.settings' within the spider). |
It's possible I'm using this wrong. But I'm doing the following:
My settings.py has
AUTOTHROTTLE_ENABLED: True
.Based on my reading of https://doc.scrapy.org/en/latest/topics/settings.html#populating-the-settings - the custom_settings value should override the value of settings.py. But the result of the above is:
It's using the value from settings.py - am I misunderstanding this or is it a bug? I was hoping to load and alter settings dynamically during the init.
The text was updated successfully, but these errors were encountered: