Member Avatar for Member #582268

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

Recommended Answers

All 7 Replies

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."

Member Avatar for Member #582268

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."

This is other thing, from: http://code.google.com/p/pygoogle/

Member Avatar for Member #682468

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 Member #582268

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?

Member Avatar for Member #682468

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 Member #582268

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

Member Avatar for Member #682468

Here is a list of their APIs http://code.google.com/more/ I have never personally used them so I can't give any examples.

Joe

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.