How to extract Google Instant predictions

Information related to the use of iMacros for Web Scraping, Data Mining and creating Mashups.

Moderator: iMacros Moderators

How to extract Google Instant predictions

by Tom, Tech Support on Mon Dec 05, 2011 5:35 am

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
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Return to How-To's and Examples for Web Scraping

Who is online

Users browsing this forum: No registered users and 1 guest

-->