是需要这个Python提交的代码吗?
[Python] 纯文本查看 复制代码 import requests
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"Accept-Language": "zh-CN,zh;q=0.9",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Content-Type": "application/x-www-form-urlencoded",
"Origin": "http://antpython.net",
"Pragma": "no-cache",
"Referer": "http://antpython.net/webspider/students_form",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
}
url = "http://antpython.net/webspider/students_form"
data = {
"name": "测试",
"gender": "boy",
"age": "88",
"python_level": "完全没接触",
"target_skills": "网络爬虫",
"description": " "
}
response = requests.post(url, headers=headers, data=data, verify=False)
print(response.text)
print(response) |