【发布时间】:2021-06-24 15:04:21
【问题描述】:
如果我想通过 python 函数手动向网站发送包含我的用户名和密码数据的发布请求。可能吗?如果是这样,一些示例代码会是什么。
以下是一些半途而废的代码,因为我对http requests 没有经验:
import requests
payload = {"username":"anton","password":"password"}
r = requests.post('https://www.walmart.com/account/login', data = payload)
print(r.text)
【问题讨论】:
标签: python http automation http-headers bots