I have a website for which my crawler needs to follow a sequence. So for example, it needs to go a1, b1, c1 before it starts going a2 etc. each of a, b and c are handled by diff
Depth first searching is exactly what you are describing:
search as deep into a's as possible before moving to b's
To change Scrapy to do breadth-first searching (a1, b1, c1, a2, etc...), change these settings:
DEPTH_PRIORITY = 1
SCHEDULER_DISK_QUEUE = 'scrapy.squeue.PickleFifoDiskQueue'
SCHEDULER_MEMORY_QUEUE = 'scrapy.squeue.FifoMemoryQueue'
*Found in the doc.scrapy.org FAQ