Not able to extract simple data ?

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
fwalser
Posts: 1
Joined: Fri Jan 20, 2017 3:25 pm

Not able to extract simple data ?

Post by fwalser » Fri Jan 20, 2017 3:31 pm

Hello,

im new to iMacro but i really tried my best, but i do not get (any) the result i need :(

I just want to extract the balance i have from a website (shown in the top left corner)

Code: Select all

URL GOTO=https://www.crypto-games.net/dice/bitcoin
TAG POS=1 TYPE=SELECT ATTR=ID:lblBalance EXTRACT = TXT
SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\";")
Result is always undefined ... i appreciate every kind of help
chivracq
Posts: 9004
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Not able to extract simple data ?

Post by chivracq » Fri Jan 20, 2017 8:11 pm

fwalser wrote:Hello,

im new to iMacro but i really tried my best, but i do not get (any) the result i need :(

I just want to extract the balance i have from a website (shown in the top left corner)

Code: Select all

URL GOTO=https://www.crypto-games.net/dice/bitcoin
TAG POS=1 TYPE=SELECT ATTR=ID:lblBalance EXTRACT = TXT
SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\";")
Result is always undefined ... i appreciate every kind of help
CIM..! :mrgreen: (Always mention your FCI when you open a Thread (or post for the first time in some existing Thread), read my Sig, many Commands are not implemented for all Browsers/Versions...)

This one should work:

Code: Select all

SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s;")
PROMPT {{!VAR1}}
But that's a bit of a cumbersome Use of 'EVAL()' if you simply want to store the Content of '!EXTRACT' in '!VAR1' without doing any Data Manipulation on it, much easier is to use:

Code: Select all

SET !VAR1 {{!EXTRACT}}
PROMPT {{!VAR1}}
And from a look at your Site, the Balance Field you want to extract is not of "TYPE=SELECT" but of "TYPE=SPAN"... But maybe you get a different HTML Content once you are logged in with some Account...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply