Popular recipes by Peer Valhoegen http://code.activestate.com/recipes/users/4184749/2012-12-31T15:33:39-08:00ActiveState Code Recipesdetermine google count by automatisation (Python)
2012-12-31T15:33:39-08:00Peer Valhoegenhttp://code.activestate.com/recipes/users/4184749/http://code.activestate.com/recipes/578392-determine-google-count-by-automatisation/
<p style="color: grey">
Python
recipe 578392
by <a href="/recipes/users/4184749/">Peer Valhoegen</a>
(<a href="/recipes/tags/count/">count</a>, <a href="/recipes/tags/google/">google</a>, <a href="/recipes/tags/linux/">linux</a>).
Revision 2.
</p>
<p>Sometimes you need o know the number of results that google gets for a specific query.
There are lots of scripts that claim to do that, but I didn't find any that worked.
They mostly rely on urllib, which is blocked by Google.</p>
<p>This script automates what you would do by hand.
It is therefore incredibly slow, but it works and seems future proof to me.</p>
<p>You may want to adjust the respective timespan that is waited before certain operations.
This script relies on the unix command xsel.
I'm sure there are equivalent solutions on other operating systems.</p>