ejes consulting

Techincal Consulting Design and Automation

Google Scripts without Google API

leave a comment »

A client I just finished working with had a few applications where they would judge the deployment of a product (a piece of software for example) by using googles output.

They considered any search product with <100,000 results obscure, less than 1,000,000 moderate, 1,000,000 to 100,000,000 significant and greater than that still as broad.

They were doing this by hand. 

Searching google and looking at the “Results x- x of about xxxx” section of google search, and using this output to judge the deployment, as I said.

The problem here is that they wanted to script this, but NOT by using google’s api (for legal reasons).

I therefore would have to find a way around. 

The easiest way, I could think of, is just capturing the output of the search… But how? 

The command line browser “lynx” in unix systems is amazing for this sort of thing.  Lynx can render a simple html page and dump it as text (using the -dump parameter) 

All I had to do then is wrap it in a nice script that would read the rendered output, and output something meaningful.

You can find the script in my script section called “googleit.py” and “deployment.py”

Advertisements

Written by ejes

August 24, 2009 at 12:24 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: