我有一個使用python scrapy運行的蜘蛛,它將所有頁面從具有參數的頁面(如&
符號)中刪除,例如http://www.amazon.co.uk/gp/product/B003ZDXHSG/ref=s9_simh_gw_p23_d0_i3?pf_rd_m=A3P5ROKL5A1OLE&pf_rd_s=center-2&pf_rd_r=1NWN2VXCA63R7TDYC3KQ&pf_rd_t=101&pf_rd_p=467128533&pf_rd_i=468294
。用scrapy刮參數化的網址
錯誤日誌說:[scrapy] ERROR: xxx matching query does not exist.
我使用CrawlSpider
具有以下SgmlLinkExtractor rule
rules = (
Rule(SgmlLinkExtractor(allow='[a-zA-Z0-9.:\/=_?&-]+$'),
'parse',
follow=True,
),
)
會很感激你的時間,並希望能有特權預先感謝您。
CrawlSpider的回調一定不能命名爲'parse'請參閱http://readthedocs.org/docs/scrapy/en/latest/topics/spiders.html#crawling-rules – groovehunter 2011-11-04 20:29:58