On Mar 26, Sébastien Ragons <srag...@gmail.com> wrote:

> i have already met this error with old version.
> the way to solve this problem is to add header to the request:
> self.set_header('User-agent', 'Mozilla/5.0')
> 
> is it the only thing to do ?

As said, this bug is fixed in the stable 4.5.1 release.
The best thing to do (and that's what 4.5* does) is to remove
the header(s) used by the urllib module and replace it with 'Mozilla/5.0'
or something like that.

The urllib module used the 'User-Agent' since Python 2.5; previously
it used 'User-agent' - this lead to the problem with IMDbPY 4.4.
Now, IMDbPY removes 'User-Agent', 'User-agent' and 'user-agent' before
it sets 'User-Agent'.


HTH,
-- 
Davide Alberani <davide.alber...@gmail.com> [GPG KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to