【scrapy】FormRequest

【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'
}
    原文作者:六分
    原文地址: https://www.jianshu.com/p/382582f3a127
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞