Jump to content
UBot Underground

Scrape Google Instant Search Results


Recommended Posts

Has anyone scraped Google Instant Search or have an idea how to go about it?

 

Example image: http://screencast.com/t/Vq9lJlz1

 

When I choose this element (the drop down keywords), I get:

 

<class="gssb_e">

 

But, I have found that the suggested keywords can vary in lenght (how many it returns), etc.

 

Any ideas/solutions you've used?

 

Thanks.

Link to post
Share on other sites

Has anyone scraped Google Instant Search or have an idea how to go about it?

 

Example image: http://screencast.com/t/Vq9lJlz1

 

When I choose this element (the drop down keywords), I get:

 

<class="gssb_e">

 

But, I have found that the suggested keywords can vary in lenght (how many it returns), etc.

 

Any ideas/solutions you've used?

 

Thanks.

 

 

There should be a way to do that but it might be more difficult than we thought.

 

Too much algorithm is involved in this. I'm just curious on why would you take that out?

Link to post
Share on other sites

As crazy as it seems, this is the attribute that scrapes Google suggestions:

 

<outerhtml=w"<td style=\"width: 100%; \"><span>*</span></td>">

 

I recently coded a bot that scrapes suggestions from approx 12 sites so I know this works as it has not failed as of yet (Until Google changes their scripting of course).

 

John

Link to post
Share on other sites

Or, you can paste this code in the code view in v4 and it will display whatever you put in the search bot on a blank browser results page.

 

ui text box("Search Term", #SearchTerm)

navigate("http://www.google.com/", "Wait")

type text(<name="q">, #SearchTerm, "Standard")

wait(2)

add list to list(%listresultsinnertext, $scrape attribute(<class="gsq_a">, "innertext"), "Delete", "Global")

load html(%listresultsinnertext)

Link to post
Share on other sites

the fastst way would be to use the google api

i am using it with imacros but with ubot i didn't succeed.

you can use it with such code

set(#searchterm, "fitness", "Global")
navigate("http://google.com/complete/search?q={#searchterm}&output=toolbar", "Wait")

 

if you copy the url created to a browser like ie or firfox, you will get a file in xml format which is easy to scrap.

but, the ubot browser doesnt respond to it.

 

anyone has any idea why the results can't be seen in the ubot browser?

Link to post
Share on other sites

Or, you can paste this code in the code view in v4 and it will display whatever you put in the search bot on a blank browser results page.

 

ui text box("Search Term", #SearchTerm)

navigate("http://www.google.com/", "Wait")

type text(<name="q">, #SearchTerm, "Standard")

wait(2)

add list to list(%listresultsinnertext, $scrape attribute(<class="gsq_a">, "innertext"), "Delete", "Global")

load html(%listresultsinnertext)

 

 

Nice example..

 

 

the fastst way would be to use the google api

i am using it with imacros but with ubot i didn't succeed.

you can use it with such code

set(#searchterm, "fitness", "Global")
navigate("http://google.com/complete/search?q={#searchterm}&output=toolbar", "Wait")

 

if you copy the url created to a browser like ie or firfox, you will get a file in xml format which is easy to scrap.

but, the ubot browser doesnt respond to it.

 

anyone has any idea?

 

The xml feed is great. however will not return the same results in some cases when manipulating the search bar in the live google search. However still a very good resource for scraping.

Link to post
Share on other sites
anyone has any idea why the results can't be seen in the ubot browser?

Ubot has never really supported xml version 3 handles it a little better

But you still can’t work in the browser with it. However it will display in the browser as long as the feed is small. I use the socket compartment and regex to work with xlm

Or you could save it to file in version 4, just have to play around and see what works best for you

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...