When searching on a website, for example, Google.com, you can either click the search button after inputting a keyword or press Enter on your keyboard directly to go to the search results page. Octoparse can easily simulate the clicking action but what if the website does not have the search button to click?
This article will illustrate how Octoparse deals with the dilemma with the "press enter" function when there is no available submit button.
You will need the below URL as an example to follow through.
There are two options for jumping over functionality limitations whenever you encounter issues.
1. Use the Press enter function in Enter Text settings
When opening the Mazda webpage, it is quite obvious that there is no available submit button to conduct the search after you have entered your keywords.
You will need to set the press enter function to let the system automatically press the enter key to search when executing the workflow.
- Click on the search box to enter a keyword
You will see an Enter Text action created in the workflow.
- Click on Enter Text action
- Select Hit the Enter/Return key when finishing entering
- Set appropriate timeout
- Set up AJAX timeouts when the website uses the AJAX technique
- Set up scroll times when the current website requires scrolling before fully loading
2. Use the search keyword as a parameter to generate a new URL
Some websites use the keyword searched as a parameter in the URL to construct new URLs. For example, the home domain of one website, https://www.allaboutincontinence.co.uk/
If you search the below keyword: id-for-men-level-3, the URL of the keyword search result is like this: https://www.allaboutincontinence.co.uk/id-for-men-level-3
You will be able to use the above URL as a starting point to set up your workflow to avoid the situation of no submit button existing on the homepage. It also saves scraping time as we don't need to enter text and click the search button.
Is this article helpful? Contact us at any time if you need our help!