DEV Community

Discussion on: Using Scrapy from a single Python script

Collapse
 
musale profile image
Musale Martin

Fantastic. We use a similar approach at work. For our case, each Scrapy project is run as a docker image for specific URL domains. Just curious, does this approach still allow middleware to be declared into the custom settings?

Collapse
 
aaronsm46722627 profile image
Aaron Smith

Hi Musale! Glad you liked the article.

There is an option to declare middleware in the custom settings yes, but I think as far as creating the middleware inside one script this is something I haven't come across. My guess would be that if you're thinking of middleware then the whole scrapy framework is the best, indeed that is what it's there for.