How to extract Google Instant predictions

Information related to the use of iMacros for Web Scraping, Data Mining and creating Mashups.
Post Reply
Tom, Tech Support
Posts: 3353
Joined: Mon May 31, 2010 4:59 pm

How to extract Google Instant predictions

Post by Tom, Tech Support » Mon Dec 05, 2011 12:35 pm

Google Instant Predictions.png
Hello everyone,

The following short demo macro shows how easy it is to extract Google's search suggestions (the ones that automatically appear in the search drop-down as you type):

Code: Select all

SET !VAR1 dog
URL GOTO=https://www.google.com/ncr
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f ATTR=ID:lst-ib CONTENT={{!VAR1}}
TAG POS=1 TYPE=SPAN ATTR=TXT:{{!VAR1}}* EXTRACT=TXT
TAG POS=R1 TYPE=SPAN ATTR=TXT:{{!VAR1}}* EXTRACT=TXT
TAG POS=R1 TYPE=SPAN ATTR=TXT:{{!VAR1}}* EXTRACT=TXT
TAG POS=R1 TYPE=SPAN ATTR=TXT:{{!VAR1}}* EXTRACT=TXT 
This macro works with iMacros for Firefox and IE (it will not work with the iMacros Browser or Chrome).
Regards,

Tom, iMacros Support
Post Reply