Colin Bean
ccbean at gmail.com
Tue Jan 10 17:30:16 EST 2006
It looks like the 403 is being returned by Google, rather than your copy of Apache. I believe that Google has some rules designed to block web crawlers / scrapers under some circumstances. One possibility would be that running your script under apache changes something in the request headers that makes Google block the request. That's just a guess, though (and my knowledge of Google's behavior is based on a project I did a couple of years ago; so take it with a grain of salt). Have you tried this code on some other URLs? What kind of results do you get then? hth, -Colin On 1/10/06, Emlyn Jones <emlynj at gmail.com> wrote: > > Hello, > I'm not convinced that this is a specific mod_python problem but I'm not > sure exactly how to explain it in generic terms so hopefully someone here > can point me in the right direction. > I have a python script which calls urllib2.urlopen to open a url on a > remote server (google). It works fine from the command line but when I run > it from a mod_python.psp page I get: > > HTTPError: HTTP Error 403: Forbidden > > Clearly this is something to do with the permissions of the apache user vs > my shell user but what is the safest way to allow this script to run? > > Regards, > Emlyn. > > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060110/906a3865/attachment.html
|