scrapy runspider in case of several spiders in a file

Created on 1 Mar 2017  路  3Comments  路  Source: scrapy/scrapy

Docs say: "run a spider self-contained in a Python file, without having to create a project."

In case there are multiple spiders in a file, one of them will be selected and run, but spider selection is not deterministic.

Although it's technically not backwards compatible, maybe the best course of action would be to raise an error in this case and do not run any spiders?

discuss

Most helpful comment

Yes, a warning works great - it won't break anything and will still help with debugging. 馃憤

All 3 comments

I think we should at least show a warning; this issue is somewhat similar to https://github.com/scrapy/scrapy/pull/2612.

Yes, a warning works great - it won't break anything and will still help with debugging. 馃憤

what about having a --spider <spidername> option like for scrapy parse?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rosspalmer picture rosspalmer  路  3Comments

Urahara picture Urahara  路  4Comments

pawelmhm picture pawelmhm  路  3Comments

Dainius-P picture Dainius-P  路  3Comments

tonal picture tonal  路  3Comments