For instance for Realtor.com
1. First I would get all the zipcodes together since the realtor.com use realtor.com/realestateagents/
zipcode I know that every page will end with the zipcode.
I use this tool to get all the zipcodes in the area I want.
5minutesite . com / local _ keywords . php
2. I would take the zipcodes and use excel to create a list of urls with the zip codes on the end. If you want to go onto the paginated urls add /pg-# to the end (# is obviously a sequential number)
3. I would take that list created in excel and use it to scrape the code grabbing everything between
agent-list-card-img-wrapper and
<div class="agent-list-card-img">
It gives me something like this:
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/donn-borah_lancaster_oh_1302815_138994333">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/heather-dunn_powell_oh_1633766_123979143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/susan-and-tracy_lancaster_oh_1184346_605994333">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/micah-smith_grove-city_oh_3167694_944379143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/kyle-atwood_circleville_oh_2246032_583894823">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/cathy-howard_reynoldsburg_oh_907716_689189143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/anita-bailey_dublin_oh_191388_956699143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/michelle-kovach_grove-city_oh_589422_351389143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/justin-price_columbus_oh_2185319_477579143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/mike-leimeister_binder_ca_901336_4196777">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/mindy-jane-back_reynoldsburg_oh_164178_676099143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/jennifer-ficheria_reynoldsburg_oh_1921521_897779143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/alanna-frole_columbus_oh_796849_633289143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/michelle-madosky_upper-arlington_oh_241443_591099143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/molly-cotter_upper-arlington_oh_108564_495599143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/diane-cheatham_columbus_oh_1309620_915089143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/rose-copp_columbus_oh_28549_143799143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/andy-schiffman_columbus_oh_746315_931689143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/george-"mick"-groom_reynoldsburg_oh_2698505_958479143">
- col-lg-2 col-sm-3 col-xxs-4"> <a href="/realestateagents/tonya-stevison_pickerington_oh_1150259_797789143">
Only A LOT OF THEM
4. I take all these and use excel to separate out the columns so that the only thing in the column is what's in the <a href> tag, so the first one would be
/realestateagents/donn-borah_lancaster_oh_1302815_138994333
Then add use excel to add http://www.realtor.com to each one so that I end up with a full URL
5. Then I would take that URL list and scrape each page looking for the URL of the Realty Company website, to do that I need to find:
<ul class="fa-ul">
<!-- address -->
<li>
<i class="fa-li fa fa-external-link"></i>
<a href='http://www.bartlettbennerrealty.com' class='track-my-clicks' itemprop="url" data-linkname="realtors:agent_details:contact_info_modal:view_website" target="_blank">View Website</a>
</li>
and extract the URL from the <a href> tag.
6. This will result in a list of all Realtor websites URLs. Many Realty companies have email addresses directly in the site on their profile page and you can use scrapebox to check the website for email addresses.
(to do this paste the url list into the URL's Harvester panel. Then in the left hand box click the drop down Grab/Check the click "Grab Emails By Crawling Site")
7. Save the result of the "Grab emails by Crawling Sites" somewhere
For most people that probably should net quite a few emails but since I'm an overachiever (sometimes) and want to make sure I get everything I can so I would continue doing the following steps
8. Trim the urls down to the domain level and then would once again fire up Excel and take that url list and remove http:// or https:// so that all I have is domain-name dot extension. Using the same example from above all it would be in the cell would be
bartlettbennerrealty.com
9. I would add to each url an @ at the beginning and then enclose them in quotes. So the previous example would look like
"@bartlettbennerrealty.com"
10. Back into scrape box. Clear the URL's Harvested list
11. Paste into keywords box my list of @ urls.
12. Then Harvest those URLS from the search engines
13. Once finished I would then do "remove duplicate URLs" and then once again click "Grab/Check the click "Grab Emails By Crawling Site" on the harvested URLs
14. Save the results
15. Combine in excel with the previous "Grab Emails"
16. De-duplicate that list
That should give you a nice size list. If you're still not satisfied you got everything well you can probably use the harvested urls list to further to mine data - though I haven't thought past this.
I prefer to use the program Outwit Hub Pro for my scraping as its easier but using Pagescanner with your custom footprint can do the same thing.