You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from scrapy.utils.project import get_project_settings
Only allows reading settings from the settings.py file. If a user wants to overwrite MONGODB_DATABASE, for example, from the command line using the -s flag, it won't register in scrapy-mongodb.
The solution would be to do something like:
class MyExtension(object):
@classmethod
def from_crawler(cls, crawler):
settings = crawler.settings
if settings['LOG_ENABLED']:
print "log is enabled!"
The way you're currently getting settings:
Only allows reading settings from the settings.py file. If a user wants to overwrite MONGODB_DATABASE, for example, from the command line using the -s flag, it won't register in scrapy-mongodb.
The solution would be to do something like:
Source: http://doc.scrapy.org/en/latest/topics/settings.html
The text was updated successfully, but these errors were encountered: