How to extract Google Instant predictions

Information related to the use of iMacros for Web Scraping, Data Mining and creating Mashups.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team
Post Reply
Tom, Tech Support
Posts: 3834
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