!Extract

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
chivracq
Posts: 9490
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !Extract

Post by chivracq » Sun Aug 12, 2018 2:20 am

And, any Progress...?

And why did you completely truncate your Thread Title..? "[Re:] !Extract" is now a bit useless as Title...!? :shock:
Your original Thread Title was maybe not perfect, but it was OK..., check my Posts, I bash Users very often for the "Quality" of their Thread Titles if they are not Descriptive, I didn't say anything about yours...

Oh-jeez...!, and we are already on Page_2 of the Thread, with thus already 15+ Posts in this Thread, which should have been handled in 2-3 Posts in 30 min, completely easy, no Difficulty at all... :shock:

OK, @OP, I will reply once more to this Thread, it's all taking way too long..., wasting everybody's time, I already gave you the Sol a few days ago... :roll:
And restore your Original Thread Title... :roll:
- (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...
raykay84
Posts: 9
Joined: Tue Aug 11, 2020 11:54 pm

Re: !Extract

Post by raykay84 » Fri Aug 14, 2020 6:26 pm

Hi @chivracq, i found this post really interesting and try to figure out a calucalation based macro myself.

I am using VERSION BUILD=10021450 in FF
Bowser FF 79.0
iMacros for FF
Windows 10 Professional 64-bit Operating system

Currently my code is following:

Code: Select all

VERSION BUILD=10021450
TAB T=1
TAG POS=1 TYPE=SPAN ATTR=TXT:* EXTRACT=TXT
SET !VAR1 EVAL("var s='{{!EXTRACT}}'; var z=s*1.05; z;")
PROMPT {{!VAR1}}

TAB T=2  
'URL GOTO=http://demo.imacros.net/Automate/AutoDataEntry
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=ID:fname CONTENT={{!VAR1}}
What i am trying to reach is get the price of an item in step one and add +5% via the EVAL command to the price before i paste it into another field.
However something seems to be wrong with my code. It just extracts the price and does not modify nor paste it into the field. I made sure it only extracts numbers (Format: XX,XXX) and nothing else.
Any idea on this?

In another step i would also like to divide the price through a fixed number. Example would be to calculate how many items i can purchase for a fixed amount i have in my wallet. Would this worK?

Code: Select all

VERSION BUILD=10021450
TAB T=1
TAG POS=1 TYPE=SPAN ATTR=TXT:* EXTRACT=TXT
SET !VAR1 EVAL("var s='{{!EXTRACT}}'; var z=s/1000; z;")
PROMPT {{!VAR1}}

TAB T=2  
'URL GOTO=http://demo.imacros.net/Automate/AutoDataEntry
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=ID:fname CONTENT={{!VAR1}}
chivracq
Posts: 9490
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !Extract

Post by chivracq » Fri Aug 14, 2020 7:00 pm

raykay84 wrote:
Fri Aug 14, 2020 6:26 pm
Hi @chivracq, i found this post really interesting and try to figure out a calucalation based macro myself.

I am using

Code: Select all

VERSION BUILD=10021450 in FF
Bowser FF 79.0 
iMacros for FF
Windows 10 Professional 64-bit Operating system
Currently my code is following:

Code: Select all

VERSION BUILD=10021450
TAB T=1
TAG POS=1 TYPE=SPAN ATTR=TXT:* EXTRACT=TXT
SET !VAR1 EVAL("var s='{{!EXTRACT}}'; var z=s*1.05; z;")
PROMPT {{!VAR1}}

TAB T=2  
'URL GOTO=http://demo.imacros.net/Automate/AutoDataEntry
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=ID:fname CONTENT={{!VAR1}}
What i am trying to reach is get the price of an item in step one and add +5% via the EVAL command to the price before i paste it into another field.
However something seems to be wrong with my code. It just extracts the price and does not modify nor paste it into the field. I made sure it only extracts numbers (Format: XX,XXX) and nothing else.
Any idea on this?

In another step i would also like to divide the price through a fixed number. Example would be to calculate how many items i can purchase for a fixed amount i have in my wallet. Would this worK?

Code: Select all

VERSION BUILD=10021450
TAB T=1
TAG POS=1 TYPE=SPAN ATTR=TXT:* EXTRACT=TXT
SET !VAR1 EVAL("var s='{{!EXTRACT}}'; var z=s/1000; z;")
PROMPT {{!VAR1}}

TAB T=2  
'URL GOTO=http://demo.imacros.net/Automate/AutoDataEntry
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=ID:fname CONTENT={{!VAR1}}

Yeah, but hum, @raykay84, I would think it's "better" if you start your own New (Standalone) Thread (and you can include a Link to this one of course, or quote some Content from it...), as this Current Thread was already on Page_2, so I don't really "feel" like digging again into it..., and the @OP from this Thread made a bit "a mess out of it" and completely mutilated the Thread Title which is now a bit useless, and I don't answer Threads with a "useless" (= Non-Descriptive) Title if they won't be found by other Users searching the Forum... :|

=> Correct Sub-Forum will be the 'Data-Extraction' one indeed, and give a Descriptive Title to your Thread, of course...! :wink: :!:
And once you've created that New Thread, you can edit your previous Post or add a New short Reply to include the Link to your Thread if you want... (Not for me as I will "see" it, but maybe for other Users in the Future...)

:arrow: And 'Free'/'PE' is missing from your FCI, oops...! :!:
- (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