Preferred way to use a search bar #608
Answered
by
janbuchar
afuetterer
asked this question in
Q&A
|
Hi, let's say a Is there a way to achieve this, or is this absolutely the wrong thing to try to achieve with crawlee? Thanks. |
Answered by
janbuchar
Oct 24, 2024
Replies: 1 comment 5 replies
|
Do I understand it right that you have a list of search queries and you want to submit each to a search box on a website and then scrape the search results? |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First off, I'd definitely advise you to use request labels to differentiate the request types, but you may already be doing that.
Regarding handling the search bar, there are multiple high level approaches. I'd probably make a request for each of your search terms like this:
In your handler for the
searchlabel, you can extract the fragment fromcontext.request.url, enter it into the search bar and handle the results in any way you see fit.