"Enter text" is an action to simulate the behavior of entering text on a web page. For example, if we have a list of keywords to search on Amazon.com, we can use this feature to input the keywords on the Amazon search box. Or we can input login credentials on the page to scrape data behind a login. In this tutorial, we'll be learning how to use the "Enter text" feature to input text on a web page.
1) Input a single keyword into the textbox
Entering the text or keyword in Octoparse is easy. With the built-in browser, you can interact with the web page by simply pointing and clicking, just like what you do using any normal browser.
Let’s see the very basic steps to input the text in Octoparse.
1. Click on the login box on the page in the built-in browser and select "Enter text" in "Tips" panel
2. Input texts in the box on the "Tips" and then click "Confirm".
3. When the configuration is completed, click "Enter text" to check whether Octoparse is able to execute the command. If you find Octoparse is entering texts, that means your configuration is successfully set up.
2) Input multiple keywords into a search box
If you have a series of pre-defined and specific text values, you can add them to the "Text list" to create a loop search action. Octoparse will automatically enter every word in the list into the search box, one word a time.
Let's see how to create a "Text list" loop to scrape data by searching multiple keywords on a website.
1. Hover on the workflow and click the "+" button
2. Select "Loop"
3. Hover on the "Loop Item" bar and then click the "gear" icon.
4. Click "Loop Mode" to switch it to "Text List" from the default mode.
5. Click and then input the keywords on the pop-up box. One keyword per line. Lastly, click "Confirm" and "OK".
6. Click on the search box on the page in the built-in browser and select "Enter text" on "Tips" panel
7. No need to input the text and just click confirm to create an Enter text step
8. Drag the "Enter Text" action into the "Loop Item" in the Workflow designer,
7. Hover on the "Enter Text" action and click the "gear" icon.
8. Select "Use text in the loop to enter the text box" then click "OK" to save the setting.
8. When the configuration is completed, click and then click "Enter text" to check whether Octoparse is able to execute the command. If you find Octoparse is entering texts orderly, that means your configuration is successfully set up.
Artículo en español: Ingrese texto
También puede leer artículos de web scraping en el sitio web oficial