Issue
How do I enable item pipeline if I define the ItemPipeline class in the same file as my spider. I tried the following but didn't work. Thanks.
process = CrawlerProcess(settings={
'ITEM_PIPELINES': {'ItemPipeline': 100}
})
Solution
You need to provide the whole import path of the class.
For example, if your spider file is at myproject/spiders/myspider.py
, use myproject.spiders.myspider.ItemPipeline
.
Answered By - Gallaecio
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.