Conversation
form_requests helper for HTTP crawlers with HTML parsersform_requests helper for HTTP crawlers with HTML parsers
Mantisus
marked this pull request as draft
September 25, 2026 19:06
Mantisus
force-pushed
the
form-request
branch
from
September 28, 2026 23:24
be9515b to
d41b283
Compare
form_requests helper for HTTP crawlers with HTML parsersextract_form_requests helper for HTTP crawlers with HTML parsers
Mantisus
force-pushed
the
form-request
branch
4 times, most recently
from
October 1, 2026 10:43
cfd9dde to
47e4629
Compare
extract_form_requests helper for HTTP crawlers with HTML parsersextract_form_requests helper for HTTP crawlers with HTML parsers
Mantisus
marked this pull request as ready for review
October 1, 2026 10:52
Collaborator
|
Currently, this is supported as user-specific code. What motivated adding it as a dedicated helper in the library? |
Collaborator
Author
|
I believe it'll be quite useful for users, since it removes a fair amount of boilerplate. A good example is a form on an ASP.NET site, which may have a single user field next to several hidden fields that need specific handling, like |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
extract_form_requeststoParselCrawlingContextandBeautifulSoupCrawlingContext. It reads a form from the page, fills in the given values and returns requests that submit it the way a browser does, keeping hidden fields such as CSRF tokens. By default, one form is submitted: the one sharing the most field names withfields. Theselector,clickandall_formsarguments pick the forms and the submit button.Testing