i have a scrapy pipelines.py and i want to get the given arguments. In my spider.py it works perfect:
class MySpider( CrawlSpider ):
def __init__(self, h
I may be too late to provide a useful answer to op but for anybody reaching this question in the future (as I did), you should check the classmethods from_crawler
and/or from_settings
.
This way you can pass your arguments the way you want.
Check: https://doc.scrapy.org/en/latest/topics/item-pipeline.html#from_crawler
from_crawler(cls, crawler)
If present, this classmethod is called to create a pipeline instance from a Crawler. It must return a new instance of the pipeline. Crawler object provides access to all Scrapy core components like settings and signals; it is a way for pipeline to access them and hook its functionality into Scrapy.
Parameters: crawler (Crawler` object) – crawler that uses this pipeline