On 2012-10-01, Nick Cash <nick.c...@npcinternational.com> wrote: >> urllib2.urlopen('http://scholar.google.co.uk/scholar?q=albert >>... >> urllib2.HTTPError: HTTP Error 403: Forbidden >> >> Will you kindly explain me the way to get rid of this? > > Looks like Google blocks non-browser user agents from retrieving this > query. You *could* work around it by setting the User-Agent header to > something fake that looks browser-ish, but you're almost certainly > breaking Google's TOS if you do so.
I don't know about that particular Google service, but Google often provides an API that's intended for use by non-browser programs. Those interfaces are usually both easier to use for the programmer and impose less load on the servers. -- Grant Edwards grant.b.edwards Yow! I am deeply CONCERNED at and I want something GOOD gmail.com for BREAKFAST! -- http://mail.python.org/mailman/listinfo/python-list