Create your first recipe

Hey ~ After studying the previous chapters, are you eager to create recipes?

This tutorial will teach you step by step how to create your first recipe.

Now, let's open the practice page: Best Seller Books, Suppose we are going to collect the following data from a list:

data-marker

As marked in the figure above, we need to extract the following 6 data:

  1. Title
  2. Author
  3. Selling Price
  4. Original Price
  5. Cover
  6. Link

Let's take a look at what the data we successfully collected looks like! 👇

data-preview

Now that the data we need to collect is clear, let's start creating the recipe!

Create Recipe

Open the Tapicker extension and click the "Create Recipe" button. Once the recipe editor is open, select the Custom template.

custom-template

Step 1. Edit the "Open Page" node and fill in the current link.

node-open-page

Step 2. Edit the "Extract Data" node.

This step is the key to successfully extracting data. All we have to do is tell Tapicker which data to extract? Where is the data extracted from?

  1. Change the name of the table to: books (optional, just for better visibility)

change-table-name

  1. Set the row selector to: div.book-list > div.book-item (you can generate it via Advanced Finder), We just need to click on the title of the book and it will automatically generate a selector for that list for us.

  1. Add the first column and name it: Title, and its selector is: h3 > a (you can generate it via Advanced Finder)

  1. Add a second column and name it: Author with a selector of: div.book-card_author (you can generate it via Advanced Finder)

  1. Add a third column and name it: Selling Price with a selector of: span.book-card_price (you can generate it via Advanced Finder)

set-col-selling-price

  1. Add a fourth column and name it: Original Price with a selector of: span.book-card_original-price (you can generate it via Advanced Finder)

set-col-original-price

  1. Add a fifth column and name it: Cover with a selector of: img (you can generate it via Advanced Finder)

set-col-cover

  1. Add a sixth column and name it: Link with a selector of: a.book-card_media (you can generate it via Advanced Finder)

  1. So far, all nodes are configured. Finally, let's set up a "unique index" to prevent data duplication.

set-unique-indexes

Step 3. Fill in the recipe basic information

  1. Fill in a suitable recipe name
  2. Briefly describe the function of the recipe

fill-basic-info

The difference between whether to include the "open page" node (important)

Include

  1. You can start recipes in any Tab without opening the target website in advance.
  2. Bind to the initial page, collect the same page every time (can be solved by changing data source).
  3. In the face of scrolling loaded pages, only the first screen data can be collected (it can be solved by combining the "Scroll Page" node).

Exclude

  1. Before starting the recipe, you need to open the target website first (if you don't do this, the collection will fail).
  2. On-demand collection (assuming there is a list, and you only want to collect the data of page 1 and page 3, then you can switch to the target page first, and then start the recipe scraping).
  3. In the face of scrolling loaded pages, you need to scroll manually before starting the recipe.

Summarize

In this way, our first recipe was developed.

all right! This is the end of this tutorial, thank you for reading, go and try it now! 👉