我正在尝试登录此网站/browsergameTravian login。我已经搜索了一段时间,尝试了不同的模块,但到目前为止我还没有成功。。。你知道吗
import requests
# Fill in your details here to be posted to the login form.
payload = {
'name': 'username',
'password': 'password'
}
# Use 'with' to ensure the session context is closed after use.
with requests.Session() as s:
p = s.post('http://ts8.travian.com/dorf1.php', data=payload)
# print the html returned or something more intelligent to see if it's a successful login page.
print(p.text)
# An authorised request.
r = s.get('http://ts8.travian.com/statistiken.php')
print(r.text)
# etc...
当它打印出r.text时,html代码看起来好像失败了。。有人知道我做错了什么吗?你知道吗
你没有发送他们期望的所有正确参数。他们期望的不仅仅是用户/通行证。你知道吗
下面是我在Delphi中使用的params的一些代码
相关问题 更多 >
编程相关推荐