arachne icon indicating copy to clipboard operation
arachne copied to clipboard

Fix scrapy settings priority over global settings

Open dmkitui opened this issue 6 years ago • 3 comments

What does this PR do?

  • Fix the settings defined in default_settings.py not being applied. Currently, only settings specified in SCRAPY_SETTINGS, which itself is an empty dict are evaluated and applied.
  • Fix settings defined in individual spiders in spider_scrappy_settings not overriding the default settings.

How should this be manually tested?

No separate/new tests required as those available cover the changes.

Background context

I had wanted to use this module for some scrapping work, but item_pipelines were never applied. This should fix that.

Tested and works on Python 2.7 and 3.6.1

This should fix issue: https://github.com/kirankoduru/arachne/issues/17

dmkitui avatar Apr 21 '18 08:04 dmkitui

Coverage Status

Coverage decreased (-0.8%) to 94.186% when pulling 2ba4f7e0159a43a4a89a6781ed8eac078645679e on dmkitui:fix-scrapy-settings-priority-over-global-settings into 8185ca2e5cc615ee1acec62e35f051602129f6df on kirankoduru:master.

coveralls avatar Apr 21 '18 08:04 coveralls

Coverage Status

Coverage decreased (-0.8%) to 94.186% when pulling 2ba4f7e0159a43a4a89a6781ed8eac078645679e on dmkitui:fix-scrapy-settings-priority-over-global-settings into 8185ca2e5cc615ee1acec62e35f051602129f6df on kirankoduru:master.

coveralls avatar Apr 21 '18 08:04 coveralls

@kirankoduru Have a look and revert with your thoughts. Meanwhile, I will have a go at the tests and try to make the coverage check comply.

dmkitui avatar Apr 21 '18 08:04 dmkitui