Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.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提交html_Python_Html_Python Requests - Fatal编程技术网

通过python提交html

通过python提交html,python,html,python-requests,Python,Html,Python Requests,什么是html提交论坛,需要提交在fb上发布的数据 脚本源代码: import requests from bs4 import BeautifulSoup url = "https://www.facebook.com/login/identify/" target_profile = raw_input("Enter the Target's Profile Link: ") payload = {"email": target_profile, "submit": "submit"} r

什么是html提交论坛,需要提交在fb上发布的数据

脚本源代码:

import requests
from bs4 import BeautifulSoup

url = "https://www.facebook.com/login/identify/"
target_profile = raw_input("Enter the Target's Profile Link: ")
payload = {"email": target_profile, "submit": "submit"}
r = requests.post(url, data=payload)

f=open('results.html', 'w')
f.write(r.content)
f.close()
html来源:

<label class="uiButton uiButtonConfirm uiButtonNoText" id="did_submit" for="u_0_5"><input value="Search" name="did_submit" id="u_0_5" type="submit"></label>

有效载荷是否正确?
不知道为什么它没有发送有效负载,在它将响应保存在html文件中并通过firefox打开后,我没有得到我希望的响应,html文件应该包含发送重置代码的页面,其中电子邮件和电话号码被清除,最后2个除外,但是它只是显示一个页面,上面写着输入配置文件url,在searchb ar中使用target_profile变量查找密码重置…

你需要找到url,在那里,
/login/identify
POST请求是否会在提交后使用action=“”之类的东西??scraping新手几天来一直在尝试将此提交,至少保存以确保html具有正确的内容很难理解您所说的,一个对html不是很好的人仍在学习,但2提交配置文件url后,这是页面提交和取消部分的整块内容“”添加任何传统内容作为问题的一部分,而不是作为评论