You have to login in order to post a reply to this topic.

4 replies [Last post]
pemmy20001
pemmy20001's picture
User offline. Last seen 1 year 19 weeks ago. Offline
Joined: 08/07/2010
Posts: 12

 Hi there I am trying to find a way to extract email addresses from a series of webpages and save them in a text file.

Can someone help in how can I do it?

Thanks for your time.

Pemmy :)

hjaeger
hjaeger's picture
User offline. Last seen 1 day 3 hours ago. Offline
Joined: 07/01/2010
Posts: 31
Re: Extract email address from a page

Pemmy,

you can use a regular expression to extract email addresses - to find out more about regular expressions, have a read through the "sticky thread" on this topic (at the top of the "How do I automate?" section)

I've made an attempt at a script that downloads a webpage, extracts the email addresses and append them to a text file; please find it attached. I used the product Expresso to generate the regular expression string

FYI - I am using the beta version (3.1.0.519) of WinAutomation, so you will not be able to import the script if you're using the released version; therefore I have attached a screenshot of the script as well

Cheers,

Henrik

AttachmentSize
GetEmailAddresses.waj 29 KB
WinAutomation_GetEmailAddresses.png 22.79 KB
pemmy20001
pemmy20001's picture
User offline. Last seen 1 year 19 weeks ago. Offline
Joined: 08/07/2010
Posts: 12
Re: Extract email address from a page

Hey hjaeger,

Thanks a lot for your reply.

The image would be helpful I will try it tomorrow.

Just another thing will this code run in the background?

And also can it be done with a list of urls put in a loop and foreach url do this.

If you could please show me how to do that it will be amazing..

Thanks a lot for your help.

Pemmey :)

hjaeger
hjaeger's picture
User offline. Last seen 1 day 3 hours ago. Offline
Joined: 07/01/2010
Posts: 31
Re: Extract email address from a page

Yes, this script will run in the background (as it doesn't use keystrokes or mouse clicks) - and yes, you should be able to feed the script a list of URLs with a "For Each" Loop

Cheers,

Henrik

keong
keong's picture
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 08/19/2010
Posts: 1
Re: Extract email address from a page

Hi hjaeger,

I was thinking of getting all email addressess from yellowpages (go into a category, click to visit the website and gather the email) and save all the email addresses into different categories.

Does this script works as well?

Thanks!

Keong