Email Address Scrape from A Website

ross88guy

New Member
Joined
Dec 8, 2010
Messages
17
Hi All,

I am trying to learn how to navigate web pages using internet explorer and VBA in Excel.

What I would like to do is to go to the following web page (allyouneedtotri.com/directory/listing/clubs-and-training-venues/159/triathlon-clubs), navigate to each 'more info' page and download all the email addresses from the 'more details' pages into a sheet (there is only one in each of the 'more details' tabs)

I would then like the macro to click the number 2 on the page allyouneedtotri.com/directory/listing/clubs-and-training-venues/159/triathlon-clubs, to display the next 10 items and then the macro needs to go to each of their 'more info' pages and download the email address from each page.

I have made a few attempts but I have made a complete mess of the code and nothing seems to work.

If someone could write the first part of the code so that I can have a look and learn from it then that would be awesome

Regards

Ross
 
Yes - the random sample that I have checked all seem to have email addresses on their pages. Also, the pages which fail to have the email addresses imported into column c all have email addresses on the page.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
The first one I tested, Loughborough, doesn't have an email address.

Neither does Mansfield, Bedforshire RC, Buntingford etc.

By the way, why do you have a function for extracting the email?

That's normally used when you are faced with a whold page of text which has an email address somewhere in it's midst.

Why not just use Mid to get rid of the mailto: part of the link?
 
Upvote 0
Thanks for the advice, i will use mid in future but I just pulled a function from the internet as it came up on a Google search and seemed to do what I wanted (although I guess it is slower and more memory intensive)

I ran the code again today and it worked fine this time, although I have no idea why!

Thanks for all of your help

Ross
 
Upvote 0
Ross

Those clubs I mentioned definitely didn't have emails, unless they were hidden.:)

Was there some other problem?
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,706
Members
449,118
Latest member
MichealRed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top