作者:蓝沫 | 来源:互联网 | 2023-10-12 17:27
AspartofmyquesttobecomebetteratPythonIamnowattemptingtosignintoawebsiteIfrequen
As part of my quest to become better at Python I am now attempting to sign in to a website I frequent, send myself a private message, and then sign out. So far, I've managed to sign in (using urllib, COOKIEjar and urllib2). However, I cannot work out how to fill in the required form to send myself a message.
作为我在Python上变得更好的一部分,我现在正试图登录我经常访问的网站,给自己发一条私信,然后退出。到目前为止,我已设法登录(使用urllib,COOKIEjar和urllib2)。但是,我无法弄清楚如何填写所需的表格来向自己发送消息。
The form is located at /messages.php?action=send. There's three things that need to be filled for the message to send: three text fields named name, title and message. Additionally, there is a submit button (named "submit").
表单位于/messages.php?action=send。要发送的消息需要填写三件事:名称为name,title和message的三个文本字段。此外,还有一个提交按钮(名为“提交”)。
How can I fill in this form and send it?
我如何填写此表并发送?
5 个解决方案