Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 为什么邮递员请求和剪贴请求将我发送到不同的web?_Python 3.x_Post_Scrapy_Request - Fatal编程技术网

Python 3.x 为什么邮递员请求和剪贴请求将我发送到不同的web?

Python 3.x 为什么邮递员请求和剪贴请求将我发送到不同的web?,python-3.x,post,scrapy,request,Python 3.x,Post,Scrapy,Request,我做了这个蜘蛛,当我提出请求时,把我送到不同的网络 很遗憾,我使用了相同的参数和几乎相同的标题 def start_requests(self): url ="https://assr.parcelquest.com/Statewide" rows =self.getPin('parcels/Parcel.csv') for row in rows: params = {

我做了这个蜘蛛,当我提出请求时,把我送到不同的网络 很遗憾,我使用了相同的参数和几乎相同的标题

def start_requests(self):

        url ="https://assr.parcelquest.com/Statewide"
        rows =self.getPin('parcels/Parcel.csv')

        for row in rows:
            params = {
                'co3': 'MRN',
                'apn': 022-631-01, 
                'recaptchaSuccess':'0',
                'IndexViewModel': 'PQGov.Models.IndexViewModel'
            }
            header = {
                'Content-Type': 'application/x-www-form-urlencoded',
                'Accept' : '*/*',
                'host':'assr.parcelquest.com',
                'Referer': 'https://assr.parcelquest.com/Statewide/Index',
                'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36',
                'Accept-Encoding':'gzip, deflate, br',
                'Connection':'keep-alive'

                
            }


            #print(params)
            yield scrapy.Request(url=self.url,headers=header,body=json.dumps(params),method='POST',callback=self.property,meta = {'parcel':row},dont_filter=True)
我是邮递员:


能解释一下原因吗?

我打赌
'apn':022-631-01,
做了一些与您期望的不同的事情:)在我的Python版本中,这是一个语法错误(
语法错误:十进制整数文本中不允许前导零;对八进制整数使用0o前缀
)可能是因为我读了一个文件而只写了022-631-01,但这应该是“022-631-01”,很抱歉我的错误