imacros problem

chocolatemonkey

Junior Member
Joined
Dec 20, 2009
Messages
197
Reaction score
29
Hi all,

I'm trying to get my firefox imacros plugin to copy the alexa rank for a certain site of mine from alexa.com/mysitestatisticpage, the problem is I don't know how to have imacros copy the alexa rank number listed and paste it into a field/form on another webpage.

After doing some testing, the problem seems to be that it will only paste the orginal rank that WAS listed and not the updated rank that IS listed on alexa. How can I program imacros to copy the updated rank on alexa.com and paste it to the field/form I need it pasted into?

I can give rep to anyone that helps me with this because I've been working hours on end trying to solve this and am not getting far.

Thanks in advance for your help guys! You have no idea how I appreciate it!
 
Are you talking about the rank that is hyperlinked on the site search page, or do you mean one of the ranks on the "Get Details" page (such as 1 month, 3month, etc)?

It sounds like your script is extracting, just that you may not be extracting the correct data. Have you played around with relative positioning?
 
Are you talking about the rank that is hyperlinked on the site search page, or do you mean one of the ranks on the "Get Details" page (such as 1 month, 3month, etc)?

It sounds like your script is extracting, just that you may not be extracting the correct data. Have you played around with relative positioning?

Yeah, on the "Get Details" page. I think you have it spot on - I haven't figured out how to extract yet. In the imacros tutortial/demo videos it shows an "extract data" button under the "record" tab, but it appears to be an older version of imacros they use in the demo, because my imacros doesn't have a visible "extract data" button under the "record" tab. Where can I find it in my version? (the newest version)
 
Ahh ok, I think I see what you mean.

You can extract with the freebie version of iMacros, but I think the docs you saw were relating to the scripting edition's extraction wizard. Try this out:
Code:
VERSION BUILD=6650406 RECORDER=FX
TAB T=1
SET !EXTRACT_TEST_POPUP NO
PROMPT Input<SP>domain !VAR1
URL GOTO=http://www.alexa.com/siteinfo
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/search ATTR=ID:searchbox CONTENT={{!VAR1}}
TAG POS=1 TYPE=BUTTON ATTR=TXT:Search
TAG POS=1 TYPE=IMG ATTR=SRC:http://www.alexa.com/images/buttons/get-details.png
TAG POS=1 TYPE=TD ATTR=CLASS:avg EXTRACT=TXT
SET !VAR2 {{!EXTRACT}}
TAB OPEN
TAB T=2
URL GOTO=http://www.google.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f ATTR=NAME:q CONTENT={{!VAR2}}
That will prompt for a domain, search for it on Alexa, scrape the 1 month result, open a new tab, and enter it into the search box of the Big G. Is that kinda what you were wanting?

The documentation is cryptic and the syntax is stupid, but you can do a lot with iMacros.

I should also mention that most sites have "1 month" and "3 month" stats, but more popular sites have "Yesterday", "7 day", "1 month", and "3 month" stats listed. In the code above iMacros will scrape the first instance, which for most sites is the "1 month". If you did it for a huge site, it would get the "Yesterday" as that is listed first.

To get the other stats, you'll want to use relative positioning. For example, to get the "3 month" stats for YouTube, you would change this:
Code:
TAG POS=1 TYPE=TD ATTR=CLASS:avg EXTRACT=TXT
to this:
Code:
TAG POS=R3 TYPE=TD ATTR=CLASS:avg EXTRACT=TXT

Hope this helps.
 
Last edited:
Back
Top