Go Back   Team-BHP > Around the Corner > Shifting gears > Gadgets, Computers & Software


Reply
 
Thread Tools Search this Thread
Old 7th April 2009, 01:38   #1
Senior - BHPian
 
Join Date: Oct 2005
Location: NA
Posts: 1,217
Thanked: 20 Times
Default Google random search results possible ?

Hi,

Is there any way to get google to give a randomised search listing ?

I need this for a little academic project I am currently working on. I could just generate random numbers and then use these to select from google but I would rather just use a tag in google to do it if possible (cuts down on my word count and methodology).

Thanks in advance.
bigman is offline   Reply With Quote
Old 7th April 2009, 10:08   #2
BHPian
 
Jaguar's Avatar
 
Join Date: May 2006
Location: Bangalore
Posts: 555
Thanked: 141 Times
Default

What do you mean by random search listing? Are you looking for some way to get different results for the same search query?

I work for a internet company in the search domain. If you can explain in detail, maybe I'd be able to help you.

- Jag
Jaguar is online now   Reply With Quote
Old 7th April 2009, 10:46   #3
Senior - BHPian
 
Join Date: Oct 2005
Location: NA
Posts: 1,217
Thanked: 20 Times
Default

Thanks Jag,

I am doing a search which is restricted to a specific tld

e.g. : I google following

monetary policy pdf site:gov.uk

From what I understand google uses some indexing system to give its results so nothing is random. I need the search results to be random (or alternatively get the search results numbered 1 to how many results there are(xxxx), then I can just use excel to generate random numbers between 1 and xxxx to get my random results.

Last edited by bigman : 7th April 2009 at 10:48.
bigman is offline   Reply With Quote
Old 7th April 2009, 11:27   #4
Senior - BHPian
 
NetfreakBombay's Avatar
 
Join Date: Jan 2008
Location: Bombay
Posts: 1,375
Thanked: 315 Times
Default

Best thing would be to use Google Search API.

With that API you can pull search results in your program. It will be available as a collection. You pick pick up random results from this collection.
NetfreakBombay is offline   Reply With Quote
Old 7th April 2009, 11:36   #5
Team-BHP Support
 
bblost's Avatar
 
Join Date: Jul 2007
Location: Hyderabad
Posts: 9,551
Thanked: 6,309 Times
Default

Using the preferences I set the number of results to 100.
Search terms: monetary policy pdf site:gov.uk
Then copied and pasted everything into EditPlus - text editor and HTML editor for Windows
Sorted it.
Removed everything before the first occurance of www.
Did a regular expression based text replace
<blank space>.* with nothing
So I now have the results alone.
Paste them in excel in column B.
In column A you can create the numbering you want.
bblost is offline   Reply With Quote
Old 7th April 2009, 11:56   #6
Senior - BHPian
 
NetfreakBombay's Avatar
 
Join Date: Jan 2008
Location: Bombay
Posts: 1,375
Thanked: 315 Times
Default

Problem comes up when this thing (Runing search and parsing Html) is automated. Google will detect that fairly soon and block the queries from that IP for few hours.
NetfreakBombay is offline   Reply With Quote
Old 7th April 2009, 14:11   #7
Senior - BHPian
 
Join Date: Oct 2005
Location: NA
Posts: 1,217
Thanked: 20 Times
Default

Thanks for the suggestions. I think I might use the option mentioned by bblost.
bigman is offline   Reply With Quote
Old 7th April 2009, 14:27   #8
Senior - BHPian
 
clevermax's Avatar
 
Join Date: Jun 2006
Location: Tvm/Amsterdam
Posts: 1,565
Thanked: 359 Times
Default

It can be made possible if you write your own scripts which will pick search results randomly from a normal google search. It is possible to write such a script in Perl.
clevermax is online now   Reply With Quote
Old 7th April 2009, 14:37   #9
Senior - BHPian
 
Join Date: Oct 2005
Location: NA
Posts: 1,217
Thanked: 20 Times
Default

Clevermax,

You fancy writing me a little perl script to do this please
bigman is offline   Reply With Quote
Old 7th April 2009, 14:51   #10
Senior - BHPian
 
clevermax's Avatar
 
Join Date: Jun 2006
Location: Tvm/Amsterdam
Posts: 1,565
Thanked: 359 Times
Default

Quote:
Originally Posted by bigman View Post
Clevermax,

You fancy writing me a little perl script to do this please
Yes, I can help you with that, by explaining how to do this in some detail.
clevermax is online now   Reply With Quote
Old 7th April 2009, 14:52   #11
Senior - BHPian
 
Join Date: Oct 2005
Location: NA
Posts: 1,217
Thanked: 20 Times
Default

Thanks.

My programming skills are pretty poor and I have no experience of perl. Will this require a lot of work ?
bigman is offline   Reply With Quote
Old 7th April 2009, 15:15   #12
BHPian
 
Jaguar's Avatar
 
Join Date: May 2006
Location: Bangalore
Posts: 555
Thanked: 141 Times
Default

Quote:
Originally Posted by bigman View Post
Thanks Jag,

I am doing a search which is restricted to a specific tld

e.g. : I google following

monetary policy pdf site:gov.uk

From what I understand google uses some indexing system to give its results so nothing is random. I need the search results to be random (or alternatively get the search results numbered 1 to how many results there are(xxxx), then I can just use excel to generate random numbers between 1 and xxxx to get my random results.

Unfortunately google doesn't provide any option to get results in any other order than their page ranks. So you'd have to rely upon other methods. The easiest/best option IMO would be to make an API call to google for your query and save the result (XML).
Then use can pull random records from it using any of the methods given by others here.

But, I don't understand the requirement for this random result. The page rank itself is not constant and keeps on evolving. So, the same query would return different results over a (long) period of time. The basic idea is that the results are ordered on the basis of relevancy.

Oh I see, the for the qyery: monetary policy pdf site:gov.uk most of the results in the first page are from the same website (Home - HM Treasury) and you want results from other sources as well for your research right?

- Jag
Jaguar is online now   Reply With Quote
Old 7th April 2009, 15:43   #13
Senior - BHPian
 
Join Date: Oct 2005
Location: NA
Posts: 1,217
Thanked: 20 Times
Default Jaguar

Jaguar,

I am doing some research and the methodology relies on random policy documents.

So which option is easier to setup a perl script or api ?
bigman is offline   Reply With Quote
Old 7th April 2009, 16:20   #14
BHPian
 
Jaguar's Avatar
 
Join Date: May 2006
Location: Bangalore
Posts: 555
Thanked: 141 Times
Default

Quote:
Originally Posted by bigman View Post
So which option is easier to setup a perl script or api ?
Depends on the user
Jaguar is online now   Reply With Quote
Old 7th April 2009, 17:09   #15
Team-BHP Support
 
bblost's Avatar
 
Join Date: Jul 2007
Location: Hyderabad
Posts: 9,551
Thanked: 6,309 Times
Default

Found something very interesting

=GoogleLookup: Creating a Google Fact Engine Directory OUseful.Info, the blog…
bblost is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Has 'Google Search' changed over the years? CliffHanger Shifting gears 29 28th June 2017 17:59
Google's Report on the Auto Industry : Search Trends & Buyer Behaviour (2012) Rehaan The Indian Car Scene 28 16th October 2016 10:14
Google's Report : Used Car Search Trends in India S2!!! The Indian Car Scene 0 22nd April 2015 11:19
Google India's Auto Industry Report : Based on search trends GTO The Indian Car Scene 40 22nd December 2011 23:01
Team-BHP on Google search jessie007 Shifting gears 4 6th February 2010 21:15


All times are GMT +5.5. The time now is 11:03.

Copyright 2000 - 2017, Team-BHP.com
Proudly powered by E2E Networks