Not able to extract simple data ?

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Not able to extract simple data ?

by fwalser on Fri Jan 20, 2017 8:31 am

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

Re: Not able to extract simple data ?

by chivracq on Fri Jan 20, 2017 1: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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 1 guest

-->