Preferred way to use a search bar #608
-
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. |
Beta Was this translation helpful? Give feedback.
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? |
Beta Was this translation helpful? Give feedback.
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
search
label, you can extract the fragment fromcontext.request.url
, enter it into the search bar and handle the results in any way you see fit.