Select & extract an element

When you first start a project, usually you will begin by selecting an element on the page (a data point) for ParseHub to scrape.

With ParseHub you can:

  1. Select one element on the page
  2. Choose particular elements to scrape (even if the highlight is not automatically visible on the page)

For this tutorial we will use - https://news.ycombinator.com/

Selecting one element on the page

If you are starting a new project on a new website from scratch follow the steps below. By default ParseHub will create a new template called main_template for you. All of your commands will go on this template.

1) If ParseHub does not automatically create an "Empty selection," click on the "Select page" command + button that is located on the right of the command. From the tool box choose the "Select" tool.

2) Click on any element (text, image, link) to select it.

3) Automatically, the text and the url behind the element will be extracted for you. You can see it at the bottom of the ParseHub interface.

Yellow highlights show like elements on the page. If you click on one, ParseHub will select all the elements similar to what you have selected.

4) To rename the way the data is called in your results just click on the "selection1" portion of the command and type in "title" or anything you want.

If you are on a new template (not the main_template) you can also click on the "Select page" command + button to make the correct selection command right under the "Select page" node.

Refining your selection when you don't see the right element highlighted

If you are hovering over an element on the page and you are getting a highlight around the wrong portion of the element, you can refine your selection by zooming.

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. Hover over the element you want to extract. If you don't see the correct highlight follow the steps below.

4. Hold down the CRTL key on your keyboard (or the CMD key on Mac).

5. Press the number 1 or 2 key on your keyboard to zoom in and out to the right element. Keep pressing 1 or 2 until you have the correct element highlighted.

6. When you see the right element, click on it.

7. The text and/or url should be automatically extracted for you for that element.

 

 

Have more questions? Submit request!

1 Comments

  • 0
    Avatar
    Mahmoud Foroughi

    Thanks a lot. It was simple & helpful.

Article is closed for comments.