[英]Submit web form with Twill is not applied?
I am trying to automate the sending of a message on a shoutbox : 我正在尝试自动在shoutbox上发送消息:
http://www.i-tchat.com/shoutbox/shoutbox.php?idShoutbox=116303 http://www.i-tchat.com/shoutbox/shoutbox.php?idShoutbox=116303
When i'm using this code every thing work fine (without error) but the message is not send (submited) 当我使用此代码时,一切正常(无错误),但消息未发送(已提交)
from twill.commands import *
url='http://www.i-tchat.com/shoutbox/shoutbox.php?idShoutbox=116303'
user= 'Toto'
mess="Test message"
go(url)
formclear('1')
fv("1", "username", user)
fv("1", "message", mess)
showforms()
submit('0')
Any Idea ? 任何想法 ?
try 尝试
submit(url)
when you press the submit button you are redirected back to the same page, have you read the source code before? 当您按下提交按钮时,您将被重定向回同一页面,您之前是否阅读过源代码?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.