Right Table Retrieval

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Ravinder
Posts: 5
Joined: Tue Nov 09, 2010 10:09 pm

Right Table Retrieval

Post by Ravinder » Wed Dec 15, 2010 4:43 pm

Hello Friends,
I am caught in strange problem. I am trying to retrieve data from the first table which is on the link:

http://www.fxstreet.com/rates-charts/forex-rates/

I want to extract Forex rates & store them which are in first table.
I am using the following script:

VERSION BUILD=784
TAB T=1
URL GOTO=http://www.fxstreet.com/rates-charts/forex-rates/
WAIT SECONDS=5
TAG POS=13 TYPE=TD ATTR=CLASS:bdytxt&&TXT:*.* EXTRACT=TXT
TAG POS=14 TYPE=TD ATTR=CLASS:bdytxt&&TXT:*.* EXTRACT=TXT


But problem is that the script is fetching values from second table(not first) or if I do some changes in the script it returns the null variable #EANF#.

Can anybody give some solution script.....
Is there a way we can specify name of the table from which we want to retrieve data in EXTRACT command?
Friends, I have spent hours on this but got only failure, please help me.
Claudiu
Posts: 32
Joined: Fri Aug 07, 2009 10:16 am

Re: Right Table Retrieval

Post by Claudiu » Thu Dec 16, 2010 12:23 pm

your not using the right tags if you need to extract individual values for Last column you'd have
attr=TXT:*&&ID:* type=TD extract=txt
attr=TXT:*&&ID:* type=TD extract=txt
attr=TXT:*&&ID:* type=TD extract=txt

you might want to consider imacros browser to help you with these extracting values
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Right Table Retrieval

Post by Tom, Tech Support » Fri Dec 17, 2010 5:39 pm

You can also use relative positioning to extract the values:

Code: Select all

VERSION BUILD=7031111 RECORDER=FX
TAB T=1
URL GOTO=http://www.fxstreet.com/rates-charts/forex-rates/
WAIT SECONDS=5
' Set extraction anchor to the Name header column
TAG POS=1 TYPE=TH ATTR=TXT:Name
' Extract first symbol name
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT
' Extract rate value from Last column
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT
' Extract next symbol name
TAG POS=R7 TYPE=TD ATTR=TXT:* EXTRACT=TXT
' Extract rate value
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT
' Extract next symbol name
TAG POS=R7 TYPE=TD ATTR=TXT:* EXTRACT=TXT
' Extract rate value
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT
' Etc.
Regards,

Tom, iMacros Support
Post Reply