为了账号安全,请及时绑定邮箱和手机立即绑定

按照Firebug的post通过python获取网页内容,可是无法正确显示?

按照Firebug的post通过python获取网页内容,可是无法正确显示?

蝴蝶刀刀 2019-02-17 18:22:36
我想获取这个网站的一些iphttp://spys.one/en/free-proxy... 因为如果我点击servers per page换成100或者50,表格里的ip就会变多,我查看了Firebug,应该是一个post request,然后我把headers和params换成了Firebug里显示的内容。 可是结果还是一个表格里30个。而不是50个。是哪里出问题了?我吧header里的一些注释掉了,因为好像老是出错,可是我觉得问题不在这里 import requests import json headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en;q=0.5', 'Connection': 'keep-alive', # 'Content - Length': 29 'Content - Type': 'application / x - www - form - urlencoded', # 'Cookie': {'_ga': 'GA1.2.1327775775.1542557446', '_gid': 'GA1.2.1490822828.1542557446'}, 'Host': 'spys.one', 'Origin': 'http: // spys.one', 'Referer': 'http: // spys.one / en / free - proxy - list /', # 'Upgrade - Insecure - Requests': 1, 'User - Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36' } url = 'http://spys.one/en/free-proxy-list/' params = {'Form Data': {"xpp": 1, "xf1": 0, "xf2": 0, "xf4": 0, "xf5": 0}} res = requests.post(url, params=params, headers=headers)
查看完整描述

添加回答

代码语言

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号