尝试对网站进行身份验证并使用requests
lib
import requests
payload = {"name":"someone", "password":"somepass", "submit":"Submit"}
s = requests.Session()
s.post("https://someurl.com", data=payload)
next_payload = {"item1":"something", "item2":"something", "submit":"Submit"}
r = s.post("https://someurl.com", data=next_payload)
print r.text
验证工作,我验证我可以发布到表单,但这个我有问题给The action could not be completed, perhaps because your session had expired. Please try again
尝试在urllib2和相同的结果 - 不要认为它是一个cookie的问题。
我想知道这个页面上的javascript是否与给出会话错误有关?其他表单页面没有任何javascripts。
感谢您的投入......