Web Scraping Tool - Learn How To Scrape Google Maps.
Want to scrape Google for 1000s of leads or want to collect information from literally any website for your business development or maybe for competition research. Growth hackers often use web scraping to automate and expedite business processes.
By the end of this video, you will learn how to collect targeted emails from Google, it’s a small nice hack I am sure you guys will like it, then I will show you a sophisticated web scraping tool and scrape Google Maps.
If you understand the concepts in this video and then research more and practice you will be able to literally scrape any website in-fact you will actually learn how to make a bot and then put it to work for anything this can do wonders for your business and all this for free.
So let’s begin the video
The first hack is that I am going to give you a search query that will help you find targeted emails from Google. This is what we will type in Google search
site:us.linkedin.com "gmail.com" OR "yahoo.com" OR "ymail.com" OR "msn.com" OR "hotmail.com" OR "aol.com" OR "mail.com" OR "mac.com" OR "real estate"
site:us.linkedin.com what this will do is bring up results only from LinkedIn. You can change the subdomain to your target country like "in" for India then write in quotes Gmail and all the other popular email clients separated by OR like "yahoo.com" OR "ymail.com" OR "msn.com" OR "hotmail.com" OR "aol.com" OR "mail.com" OR "mac.com" OR "real estate"
In the end, you need to write your keyword related to your target audience. For example, I have real estate here, this will bring up emails present on LinkedIn for people who work in the real estate industry. Similarly you should put your keyword here. Now we copy paste this query in Google search.
Since we only see 10 results here we can increase it by getting into settings and then search settings and then drag this from 10 to 100 results per page. Hit save.
Now what we will do is select all of this by control a and then copy it by control c and paste it on a free tool that you can access from this link. I will put the search query and this link in the description section.
Click on input window and paste by control v then click on extract now you can see we acquired 28 email ids .
You can browse through all the pages and build your email list. Of course, you should clean your email list before you run a cold email marketing campaign. There are a lot of free tools that can help you do that, but that’s a video for another day.
Now we move to the second part of the video, this is for people who are serious about web scraping. Web scraping can be used for a lot of purposes like lead generation, social listening, competition research, listing gatherings, you can make a comparison site or a side project supporting your main business. The scope of web scraping is immense you just need to figure out how it can be useful in your business.
Today you will learn how to create and execute a web scraping workflow, then how to import all of that data into an excel sheet and then finally how to use that recipe, that workflow for future automation.
Google Maps is an excellent source for data. The best way you can go about doing this is that you type your keywords in Google search so that it brings up local listings. Like I write here “best property builders in pune” then scroll down a bit you will see local listings, then click on more places, on this page you will see all the listings on Google Maps. You can see the name of the listing, address, phone number, their website. You will see about 20 results on this page and then you can see Google has more pages to show us.
We can now create a web scraping workflow through which we can extract these listings in an excel sheet and the best part is once you create this workflow automation you will be able to use it for any query on Google Maps.
The tool that will help us do this is called Parse Hub. Parse Hub can be used for scraping any website guys it has all essential functionalities. For this video I will use it to scrape Google Maps.
You can download Parse Hub from their website. The link is in the description section. Just follow the steps in the setup wizard it is quite simple you will be able to do it.
Once you have Parse Hub installed it should look something like this. Click on new project.
Here you need to paste the link from where you want to scrape the information. Like in our example I will put the Google Maps link and then click on start project on this URL.
Now this window is divided into 3 parts – on the left we write commands as in from here you will tell the bot what to do, then in the centre screen we see a live preview of what the bot is actually doing, then at the bottom we can see the data that is being scraped in the excel sheet.
Under commands, by default you should see a main template with first command being select page and second you can see as empty selection. Now what’s happening here is the bot has selected the page and now it wants us to select an element on this page since we have not selected anything it is empty. So let’s go ahead and select this div. Now you can see it has selected this div you can see 1 here. It will also automatically extract text and URL. You can see the name has been extracted in the excel.
Now since we want it to extract all the similar names, it is smart enough to suggest us similar divs labelled in yellow. Click on any yellow div to select and extract all of them. You can see it has extracted all 20 Google listings.
Let’s name the selection as “listingname” you cannot put space here. Then we click on this plus icon and select relative select. Since we want to tell the bot to extract related information and put it together like in our example we need to extract 4 details name, address, phone and website for each listing. So ideally we should list this information in a single row with 4 columns.
So now to do this click on the name first then you should see an arrow then click on the address. Now you can see it has extracted 20, lets name the selection as address and since this was a relative select it is extracted in the same row.
Now to add phone number, from listing name click on the plus icon and relative select then click on the name first and then the phone number.
Finally we will extract websites. So again from listing name click on the plus icon and select relative select then click on the name and then on the website. Now here you will see that it is extracting name and the URL by default so we need to remove the name since it is of no use. So we click on this download icon and then remove the selection1.
Now you can see the excel sheet looks good we have all the information required. Now we need to do some more magic so we need to tell the bot to go through and scrape all of the pages suggested by Google.
To do this we will first select the next button, name this selection as next button and then add a command on it Click.
Now Parse Hub will ask you whether this click is a next page button or it is a normal click. So ours is a next page button we can see the pagination there so we say yes and repeat in the current template is ok just click on the button.
So that’s it, it is really that simple.
Now let’s test this bot
So click on get data and then click on test run and then click on this play button to start the test.
Now you can see here the first command was select page so it has opened up the right page and now you can see it has stared extracting, looks beautiful.
It will take some time so I will speed up the video. We can see it just changed the page so it works perfectly.
Now we can stop the campaign.
Click on get data and then run. The bot will start the work it will be available for you in an excel sheet.
You can run this automation recipe for any query on Google Map you just need to get into settings and change the starting site URL.
Guys this was all for today’s video I hope after watching this video you guys can now scrape any website if you have any questions feel free to ask them in the comment section. I’ll keep posting amazing videos so make sure you subscribe and turn on notifications so you don’t miss out. Share this video with people it will be helpful for.
Bye for now I will see you guys in my next video.
Written by Arpit Khurana