用scrapy提交登录表单

2024-09-30 03:24:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用scrapy提交以下表格:

{<1分$ <form id='phpal_form' action='http://www.cecif.com/connexion-a-votre-compte.html' method='post' enctype='application/x-www-form-urlencoded' class='phpal_form f1 login-form'> <input type="hidden" value="http%3A%2F%2Fwww.cecif.com%2Fmembres-votre-espace.html" name="ref"> <div class="form-line"> <div class="block-label"> <label for="user">Email</label> </div> <div class="form-element"> <input name="user" id="email" type="text" value="" maxlength="50" class="text-input"> </div> </div> <div class="form-line"> <div class="block-label"> <label for="mdp">Mot de passe</label> </div> <div class="form-element"> <input name="mdp" id="mdp" type="password" value="" maxlength="20" class="text-input"> </div> </div> <div class="form-button"> <input id="oklogin" type="image" src="/design/defaut/img/ok-button.png" name="cecif_log" value="OK"> </div> </form>

这是我正在使用的垃圾类,但是没有用。在

{<1分$

上面的代码不起作用,FormRequest的结果是一个空的登录页面,表单提交错误信息被激活。在

有什么好主意吗!多谢了


Tags: textnamedivformidinputvaluewww

热门问题