Member Avatar for neocortex

Hello ALL! I am trying to get number of hits for a larger list of words (>500), with Pygoogle (from: http://code.google.com/p/pygoogle/):

g = pygoogle(<some request>)
freq = g.get_result_count()

Now, after starting success, probably around 200th request, I start to get only "'NoneType' object is unsubscriptable". Is this Google stuff, some kind of protection, or what? In principle, how can I get number of hits from Google for a large list of words?

Many thanks! PM

I thought PyGoogle was dead?
http://pygoogle.sourceforge.net/

"Unfortunately, Google no longer supports the SOAP API for search, nor do they provide new license keys. In a nutshell, PyGoogle is pretty much dead at this point."

The reason you are still getting some results is because Google still continues to support the SOAP protocol, but limits the results per it's depreciation policy.

Member Avatar for neocortex

The reason you are still getting some results is because Google still continues to support the SOAP protocol, but limits the results per it's depreciation policy.

Is there any other way to get number of hits from Google?

You could try looking for other Google APIs, I think the AJAX one replaced SOAP . Or you could do a screen scrape by using urllib2 , except this would be against the Google terms of service, section 5.3.

Member Avatar for neocortex

You could try looking for other Google APIs, I think the AJAX one replaced SOAP . Or you could do a screen scrape by using urllib2 , except this would be against the Google terms of service, section 5.3.

Can you give me more input for the AJAX approach?

Thanks!
PM

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.