Select the same elements on the page
This section assumes you started a new project or create a new template.
1. Click on the "Select page" command + button that is located on the right of the command.
2. From the tool box choose the "Select" tool.
3. Click on one element (text, image, link) to select it.
4. Click on another element that is similar to train ParseHub to select all of the related elements.
5. You will notice 3 new commands were created for you in the app side bar.
- Automatically all of the selections were put in a new entry for you (hidden under list icon ). This entry created an empty row in Excel for each selection or an empty scope in JSON for each selection. All of the actual data you extract from each selection and other instructions (commands) will be repeated in each row or scope for each selection.
- The text was extracted for all selections automatically. The text was extracted into an empty scope in JSON for you. In other words, into an empty row in Excel (creating a new column).
- The url was also extracted from each selection for you. In Excel, the url would be extracted into the same row as the text for each selection. The url for each selection was also added to the same scope as the text (name) of each selection.
6. To rename the "select1" command and the "new entry" command click on the "select1" node and type in whatever you want, such as "titles".
7. To rename the text that is extracted click on the first extract node and rename it to "title".
Select different elements on the page
This section assumes you started a new project or create a new template. We will use a product details page (for a coffee maker) from Walmart as an example.
Go to - https://www.etsy.com/ca/listing/244851186/name-bar-necklaceinitial?ga_order=most_relevant&ga_search_type=all&ga_view_type=gallery&ga_search_query=&ref=sr_gallery-1-1&frs=1&col=1 - to follow along with the tutorial.
All of the steps below can be repeated on any other website or webpage, for any type of elements on the page.
Select the first element (product name):
1. Click on the "Select page" command + button that is located on the right of the command.
2. From the tool box choose the "Select" tool.
3. Click on one element (text, image, link) to select it. In this example, we will select the product name.
4. The product name is automatically extracted for you. You can rename the "Select & Extract selection1" to something more meaningful like "title". If you are downloading your data via CSV, "title" will be the name of the column and the text from the product name will be extracted into the cell below the column heading.
Select the second element (product price):
1. Click on the "Select page" command + button that is located on the right of the command.
2. From the tool box choose the "Select" tool.
3. Click on one element (text, image, link) to select it. In this example, we will select the price.
4. The price is automatically extracted for you. You can rename the "Select & Extract selection1" to "price".
Select the third element (product reviews):
1. Click on the "Select page" command + button that is located on the right of the command.
2. From the tool box choose the "Select" tool.
3. Click on one element (text, image, link) to select it. In this example, we will select the reviews.
4. Continue to click on additional reviews to select them all. The reviews are automatically extracted for you. You can rename the "Select selection1" to "reviews".
Your CSV sample data should look like this:
Your JSON sample data should look like this: