5

I have the following in my settings.py

ITEM_PIPELINES = ['mybot.pipelines.custompipeline']

But when I start scrapy, I get the following warning.

/lib/python2.7/site-packages/scrapy/contrib/pipeline/init.py:21: ScrapyDeprecationWarning: ITEM_PIPELINES defined as a list or a set is deprecated, switch to a dict category=ScrapyDeprecationWarning, stacklevel=1)

It still seems to be working properly. But, what do I need to do in order to remove this warning?

Crypto
  • 1,217
  • 3
  • 17
  • 33

2 Answers2

15

see scrapy documentation for Activating an Item Pipeline component, for example:

ITEM_PIPELINES = {
    'myproject.pipeline.custompipeline': 300,
}

The integer values you assign to classes in this setting determine the order they run in- items go through pipelines from order number low to high. It’s customary to define these numbers in the 0-1000 range.

Guy Gavriely
  • 11,228
  • 6
  • 27
  • 42
1

And of course you will need to do it in settings.py file of your project file..

Nabin
  • 11,216
  • 8
  • 63
  • 98