这是我要刮的网页: http://www.nalpdirectory.com/Page.cfm?PageID=34。我想模拟提交表单#resultDisplayOptionsForm与#customDisplayNum设置为全部,这将带给我一个网页与所有列出的项目。scrapy无法提交表格
这是我的代码片段:
def parse(self, response):
yield scrapy.FormRequest.from_response(
response,
formid='resultDisplayOptionsForm',
formdata={'displayNum': '100000'}, #I tried 10, 20, 30 etc. none works
dont_click=True,
#clickdata={'id': 'customizeDisplaySubmitBtn'},
callback=self.after_showAll
)
def after_showAll(self, response):
from scrapy.shell import inspect_response
inspect_response(response, self)
当我检查响应,它总是显示失败的页面。欢迎任何建议。谢谢!
我第一次检查使用'dont_click'说法的人。 – eLRuLL
“失败的页面”是什么意思? – eLRuLL