authentication example with urllib.request

Marco Bizzarri marco.bizzarri at gmail.com
Sat Apr 25 12:44:20 EDT 2009


On Sat, Apr 25, 2009 at 8:09 AM, larryzhang <zhangle2002 at gmail.com> wrote:
> Dear all,
>
> I am trying to download data from a website that requires
> authentication (maybe with cookies). Any suggestions on how i can do
> this with the urllib.request module in py3? Where can I can find some
> working examples? Thanks a lot.
>
> Larry
> --
> http://mail.python.org/mailman/listinfo/python-list
>


Hi, Larry.

Did you get a look at library documentation? If you take a look at
http://docs.python.org/3.0/library/urllib.request.html, FancyURLOpener
could do the job for you... (once you subclass it, and redefine the
promp_user_password method).

Regards
Marco



-- 
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpisa.blogspot.com/



More information about the Python-list mailing list