學(xué)習(xí)的最好方法就是參考例子,Scrapy 也不例外。Scrapy 提供了一個(gè)叫做 dirbot 的樣例項(xiàng)目供您把玩學(xué)習(xí)。其包含了在教程中介紹的 dmoz spider。
您可以通過 [https://github.com/scrapy/dirbot]( https://github.com/scrapy/dirbot ) 找到 dirbot。其包含了 README 文件,詳細(xì)介紹了項(xiàng)目的內(nèi)容。
如果您熟悉 git,您可以 checkout 代碼。或者您可以點(diǎn)擊 Downloads 來下載項(xiàng)目的 tarball 或者 zip 的壓縮包。
Snipplr 上的 scrapy 標(biāo)簽是用來分享 spider,middeware,extension 或者 script 代碼片段。歡迎(并鼓勵(lì))在那分享您的代碼。