---
description: >-
  This tutorial shows you how to make a simple Reddit scraping skill, in 5
  minutes.
---

# Making a web automation skill in 5 minutes

The Maya browser extension allows you to [record xpaths by simply hovering over elements](recording-xpaths), and auto-generate nodes that you can import and connect in the editor to make fully functional flows from scratch.

In this tutorial we'll build a skill that scrapes the titles of the first few posts on r/dogs.

### Open the r/dogs subreddit

Go to r/dogs and open the recorder. Click the purple "Select tab" button in the bottom (you don't need to have selected an element yet). This will copy a JSON to your clipboard, which corresponds to a flow that finds a tab that has r/dogs open, or opens one if no such tab exists. Import this JSON into the skill editor.

![](https://1551505950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkaq90Au3F8Kz0qIFzO%2Fuploads%2FJGsNhmvtBdOBlg4IuvrM%2Ffindtab.gif?alt=media\&token=589df7d2-19af-4c9e-bc0b-d573918916c0)

### Scrape the post titles

On r/dogs, use the multi-select recorder to select post-title xpaths. Once done, click the "Scrape" button. This will copy a JSON to your clipboard, which corresponds to a node that scrapes the post-titles based on the select xpaths. Import this JSON into the skill editor.

![](https://1551505950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkaq90Au3F8Kz0qIFzO%2Fuploads%2FDablTx1cSpzXq2YgdV6v%2FscrapeSelect.gif?alt=media\&token=a9a68019-7eca-4229-95b8-663b061f55a3)

### Wire up the flow

Connect the query node to the find-tab flow. For this we need to connect it to the second output of the switch node and the output of the open-tab node. After this, the flow should look like this -

![](https://1551505950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkaq90Au3F8Kz0qIFzO%2Fuploads%2F41kWUlwHLhqIfmsFyvhz%2Fimage.png?alt=media\&token=72fb737b-8c36-45a0-9c8d-de3425084eb4)

{% hint style="info" %}
The delay node is added after the Open node so that the page has some time to load before we try to scrape.
{% endhint %}

### Test the flow

Add an inject node at the beginning of the flow, and add a debug node at the end so you can see the results, then click deploy to save the flow. An inject node is used to send a signal down the flow and run it.

The final flow should look like this -

![](https://1551505950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkaq90Au3F8Kz0qIFzO%2Fuploads%2FuZyS9sW3Odh22iJz3tol%2Fimage.png?alt=media\&token=368b2776-c718-459f-97f3-8dd67762faa3)

{% hint style="info" %}
Both the inject and debug nodes can be found towards the top of your node palette in the left of the editor.
{% endhint %}

### Run the flow!

Click the button on the inject node to run the flow once. Go to the debug section in the editor to see the logged message. The debug section can be accessed by clicking on the bug icon in the top-right of the editor.

![](https://1551505950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkaq90Au3F8Kz0qIFzO%2Fuploads%2FmtiMgFiXpk4nDXfUlvhb%2Fimage.png?alt=media\&token=864c325d-81e7-465c-8b9d-d80181bb6c48)

You can find the results inside the `results -> desiredValue` property.

![](https://1551505950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkaq90Au3F8Kz0qIFzO%2Fuploads%2FXppsoWn1EAG7ywAFBhT3%2Fimage.png?alt=media\&token=7633e3e6-efb8-4c76-a486-197504587a7e)

For now we'll stop at just logging the results, but you could do more from here, like adding these results to a CSV, showing them in a custom dashboard, etc. Play around, get creative!
