python写客户端发送请求失败_python爬虫post请求失败

用python3.6写的爬虫,requests库,post获取数据。

地址:http://epub.sipo.gov.cn/index...

想要获得的数据在:

例如 2018.05.29 发明授权数据已更新。

我想要的数据在这里。

下面是代码,代码是通过curl to python直接生成的,https://curl.trillworks.com/。

import requests

cookies = {

'_gscu_1718069323': '17199139j8xock20',

'_gscu_2029180466': '223759791wmvjx10',

'yunsuo_session_verify': '3e812c4367705399100bb98f9e16b577',

'_gscu_7281245': '2237647502dqei93',

'_gscbrs_1718069323': '1',

'_va_ref': '%5B%22%22%2C%22%22%2C1529994977%2C%22https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DYaZu8t1kmMcsPYzfoQs86UdJDoO2kofb1oFU3viiKsCJIZ9yL_m1n0AQxswq9DvavpQ4EjzqFXLs94pAhFN_c_%26wd%3D%26eqid%3Dfb76c07900017f6f000000035b31dec2%22%5D',

'_va_id': '516b758a68708fa6.1522634492.10.1529994977.1529994977.',

'JSESSIONID': 'B2D82513C17C3136F8F3CDD4E789B31D',

'WEB': '20111130',

'Hm_lvt_06635991e58cd892f536626ef17b3348': '1528852861,1528852902,1528853005,1530495309',

'_gscbrs_7281245': '1',

'TY_SESSION_ID': 'fb5e77db-26bb-4657-84b0-412460f717e9',

'Hm_lpvt_06635991e58cd892f536626ef17b3348': '1530498299',

'_gscs_7281245': '3049530864pnz237|pv:22',

'keycookie': '4d8222a825',

'expirecookie': '1530498797',

}

headers = {

'Connection': 'keep-alive',

'Cache-Control': 'max-age=0',

'Origin': 'http://epub.sipo.gov.cn',

'Upgrade-Insecure-Requests': '1',

'Content-Type': 'text/plain;charset=UTF-8',

'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',

'Accept': 'image/webp,image/apng,image/*,*/*;q=0.8',

'Referer': 'http://epub.sipo.gov.cn/patentoutline.action',

'Accept-Encoding': 'gzip, deflate',

'Accept-Language': 'zh-CN,zh;q=0.9',

'Intervention': '; level="warning"',

}

data = [

('showType', '1'),

('strSources', ''),

('strWhere', 'PD=\'2018.06.26\''),

('numSortMethod', '5'),

('strLicenseCode', ''),

('numIp', '0'),

('numIpc', ''),

('numIg', ''),

('numIgc', ''),

('numIgd', ''),

('numUg', ''),

('numUgc', ''),

('numUgd', ''),

('numDg', ''),

('numDgc', ''),

('pageSize', '3'),

('pageNow', '1'),

]

response = requests.post('http://epub.sipo.gov.cn/patentoutline.action', headers=headers, cookies=cookies, data=data)

返回结果是没有查询结果:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值