【scrapy】FormRequest <TypeError: to_bytes must receive a unicode, str or bytes object, got int>
原因:formData里面有的参数是数字,转成字符串就行
for i in range(5):
num = i+1
data = {
'ajax' : 'ajax',
'searchKey':'searchKey',
'projectStatus':'projectStatus',
'projectModel':'-1',
'financingModel':'0',
'pageNo':str(num),
'pageCount':'12'
}