create a link from phone number

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
jeremyn
Posts: 2
Joined: Tue Jul 08, 2008 1:35 pm

create a link from phone number

Post by jeremyn » Wed Jul 09, 2008 6:43 am

I am looking for a way to find phone numbers which appear on any web page thank then create a url form them. eg imagine that on a web page the phone number (03) 1234 1234 appeares the macro would find it and allow a user to click it and it would load a url being http://10.0.0.1/blah.cfm?number=0312341234 is this possible ? I understand we would have to somehow work our the patterns for phone numbers, but I think we can do this
thanks in advance
Hannes, Tech Support

Re: create a link from phone number

Post by Hannes, Tech Support » Mon Jul 14, 2008 9:35 am

I'd recommend to use scripts do string manipulation, but for simple cases, the ADD command can be used:

Code: Select all

VERSION BUILD=6200707     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://www.iopus.com/imacros/demo/v6/extract2/     
TAG POS=1 TYPE=TD ATTR=TXT:5   EXTRACT=TXT
SET !VAR1 hello
ADD !VAR1 {{!EXTRACT}}
URL GOTO=http://{{!VAR1}}.org
Renius
Posts: 5
Joined: Tue Jul 29, 2008 3:34 am

Re: create a link from phone number

Post by Renius » Tue Jul 29, 2008 3:58 am

u can extract phonenumber from extraction using regular expression
Post Reply