loginform icon indicating copy to clipboard operation
loginform copied to clipboard

Not all form fields are included in the posting

Open kalessin opened this issue 12 years ago • 1 comments

In this login page, for example,

https://www.beyondtherack.com/auth/login

there is the submit button element with name _submit inside the login form, which is not being included in the posting, but it is required for the login to be successful (tested)

The problem is that the lxml method form.form_values() alone does not include all the involved fields in the form. Seems it only includes the input elements.

kalessin avatar Nov 14 '12 13:11 kalessin

@kalessin check the code on scrapy.http.request.form, it has support for submitting values of clickable elements (which works like that by default unless dont_click is passed). You may be able to get some ideas from there to submit a PR to fix this.

There's a lot of code in that module though, probably much more than we need here, so only import strictly what you need.

pablohoffman avatar Nov 14 '12 13:11 pablohoffman