How To Scrape Data From Any Website To A Google Sheet.
This article explains how to scrape data from any website and paste to a google sheet
In today's data-driven world, gathering information from various online sources has become indispensable to numerous projects and tasks. Whether you're a researcher, analyst, marketer, or simply someone seeking valuable insights, harnessing data from websites can provide a wealth of knowledge. However, manually copying and pasting data from websites can be time-consuming and error prone.
Thankfully, with the Task Magic desktop application, web scraping is easy and efficient! Consider the hours you are going to save! In this step-by-step guide, we'll show you how to use our scrape texts and scrape URL features to pull data from any website and transfer it directly to a Google Sheet. Let's get started!
Here’s a video tutorial on how to do basic data scraping.
If you’d rather read the documentation, these are the following steps. Getting Started - Locating Capturing Steps
You’ll want to create a recording to be able to scrape data from websites.
Login into the desktop application and make sure to select the workspace you want to build this automation in. If you are in a workspace with no automations, then you’ll click the Start capturing
button to get started.
If you are in a workspace with existing automations. You’ll find there’s an Add new automation
in the top right corner of the application. Click the Add new automation
.
Next, click Capture Steps
to get started.
Recording Your Automation To Scrape Data - Understanding the Features in the Recording Bar.
After clicking Capture Steps
there will be a countdown from 3,2,1 and a chromium window will open. In additional a small bar at the bottom of your primary window will open. We call this the Recording Bar
, the Recording Bar will include the features needed to scrape data from any website.
How to Scrape a List of Data
As an example, I searched Yellow Pages for roofing services near me.
To scrape each name, phone number, address, etc. on this list, click the Scrape: List
button.
Next, select two of the same elements
(ex: two names, phone numbers, etc.) of the list you want to scrape.
IMPORTANT
Don’t select ads. They are different than normal elements on the page. It’s important you only select normal elements on the page. If you scrape an element that's also a link (like the name of the company that takes you to the company page), you’ll see these two options.
In this example we used both options, text and URL. So, I clicked on the same element twice. The first time was for the text (as you can see on the left), so I selected the “Text” option. The second time was for the URL (as you can see on the right), so I selected the “URL” option.
If you want to scrape the URL links from a website (as long as it is provided), we can do this efficiently with the desktop application.
There is a possible error you can get while scrapping, and it’s the following.
This happens because the two elements you selected weren’t the same (ex: two names, phone numbers, etc). We need to make sure they are both the same in order to make it work properly.
When successfully captured, you can press the small green arrow that is all the way to the right of theRecording Bar
and you’ll only see 4 rows of the elements you’ve captured (there's is more than 4 elements, but the view is limited to those 4). If you are satisfied with the elements, you’ve selected you can end the automation.
When you’ve ended the automation, you’ll need to continue to edit the steps because we need to connect a google sheet (this is where the information will be stored).
Next, click on the “Send to Google Sheets” button.
In this case I used a URL. If you go to your Google Sheet, on the top right corner you’ll this share button.
In this option you can see a link icon on the bottom left of the pop up. This button is to copy the link. You’ll also have to share the automation to the following email: automations@taskmagic.com
Once you’ve done those two steps you can continue in TaskMagic. Make sure everything in your sheet is correct. If so, press the “Looks good” button.
Once you’ve connected the sheet, you can now press the “Play steps” button.
You are basically done. Just let our app do its magic.
If you see the “run successfully” notification, that only means one thing.
Go back to your Google Sheet and you’ll see all the information scrapped.