を使用して: http://www.aido.com/eshop/cl_2-c_189-p_185/stationery/pens.htmlページネーションが、私はこのウェブサイトをクロールしようとしているscrapy
私は、このページにすべての製品を得ることができますが、どのように私は、ページの下部にある「もっと見る」リンクのための要求を発行します?今まで
私のコードは次のとおりです。
rules = (
Rule(SgmlLinkExtractor(restrict_xpaths='//li[@class="normalLeft"]/div/a',unique=True)),
Rule(SgmlLinkExtractor(restrict_xpaths='//div[@id="topParentChilds"]/div/div[@class="clm2"]/a',unique=True)),
Rule(SgmlLinkExtractor(restrict_xpaths='//p[@class="proHead"]/a',unique=True)),
Rule(SgmlLinkExtractor(allow=('http://[^/]+/[^/]+/[^/]+/[^/]+$',), deny=('/about-us/about-us/contact-us', './music.html', ) ,unique=True),callback='parse_item'),
)
任意のヘルプ?
これは役に立ちましたが、「スクラピーのリクエストオブジェクトをインスタンス化する」方法の例がさらに役立っていました。 – SMPLGRP