【发布时间】:2015-01-28 18:41:31
【问题描述】:
我正在尝试从网站中提取信息,这样做需要我登录。一切顺利,直到我到达提交按钮:
MissingSchema: Invalid URL u'/index.php?r=site/login': No schema supplied.
Perhaps you meant http:///index.php?r=site/login?
据我了解,这是因为网站将自身重定向到服务器上的页面。有没有办法让按钮重定向到整个页面而不是服务器上的本地文件?或者我什至对为什么会发生这个错误是正确的?
提前致谢
我的代码要点:
from twill.commands import *
go('panel.picklehosting.com/index.php?r=site/login')
showforms()
formclear('1')
fv("1", "name", "usrname")
fv("1", "password", "mypass")
submit()
【问题讨论】:
-
您能展示一下您目前拥有的代码吗?谢谢。
-
你用的是什么版本的斜纹布?我尝试过使用 0.9 版(非常旧,与 Debian 一起打包,这就是原因),它适用于我。
-
@ClemensKlein-Robbenhaar 试过了,同样的错误
标签: python python-requests twill