Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.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 使用请求发布textarea数据_Python 3.x_Python Requests - Fatal编程技术网

Python 3.x 使用请求发布textarea数据

Python 3.x 使用请求发布textarea数据,python-3.x,python-requests,Python 3.x,Python Requests,我正在学习使用请求,但在从表单的Textarea字段发布和检索数据时遇到了问题 import requests url = 'https://northcutt.com/tools/free-seo-tools/multiple-reverse-ip-lookup/' values = {'f_ip_list' : '134.177.0.178'} headers = {} headers['User-Agent'] = "Mozilla/5.0 (X11; Linux i686) Apple

我正在学习使用请求,但在从表单的Textarea字段发布和检索数据时遇到了问题

import requests

url = 'https://northcutt.com/tools/free-seo-tools/multiple-reverse-ip-lookup/'
values = {'f_ip_list' : '134.177.0.178'}
headers = {}
headers['User-Agent'] = "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17"

r = requests.post(url, data=values, headers = headers)
print(r.text)
正如我在Chrome中检查的那样,这个表单有两个数据源:f_ip_list和dataSource。我两个都试过了,但还是没有结果。我将感谢任何帮助


代码中使用的IP是随机生成的。

您只传递formdata中的一个字段

URL=”https://northcutt.com/tools/free-seo-tools/multiple-reverse-ip-lookup/"
值={
“f_ip_列表”:“0.0.0.0”,
“数据源”:“免费搜索引擎优化工具”
}
response=requests.post(url=url,data=value)
输出:


哦,它就在我鼻子前面。非常感谢。