authentication example with urllib.request

Discussion in 'Python' started by larryzhang, Apr 25, 2009.

  1. larryzhang

    larryzhang Guest

    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
     
    larryzhang, Apr 25, 2009
    #1
    1. Advertising

  2. On Sat, Apr 25, 2009 at 8:09 AM, larryzhang <> 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/
     
    Marco Bizzarri, Apr 25, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonathan Gardner

    Asynchronous urllib (urllib+asyncore)?

    Jonathan Gardner, Feb 26, 2008, in forum: Python
    Replies:
    1
    Views:
    476
    Terry Jones
    Feb 27, 2008
  2. oyster
    Replies:
    1
    Views:
    260
    Marc 'BlackJack' Rintsch
    Jul 1, 2008
  3. Chris McDonald
    Replies:
    0
    Views:
    297
    Chris McDonald
    Nov 1, 2010
  4. Johannes Kleese
    Replies:
    4
    Views:
    267
    Terry Reedy
    Nov 27, 2012
  5. Terry Reedy
    Replies:
    0
    Views:
    360
    Terry Reedy
    Nov 13, 2012
Loading...

Share This Page