Re: Login to website using urllib2

Discussion in 'Python' started by Gabriel Genellina, Sep 19, 2008.

  1. En Thu, 18 Sep 2008 10:23:50 -0300, Mohit Ranka <>
    escribió:

    > I am trying to fetch HTML content from a website that has
    > different version of pages for "logged" users and "guseuests" users. I
    > need
    > to fetch the "logged" user pages. The problem is, even with the use of
    > basic
    > authentication, I am getting "guest" user page with urllib2.urlopen. The
    > code can be seen here.
    >
    > http://pastebin.com/m7301084a
    >
    > Any suggestions/pointers/solutions?


    Your second call to urllib2.install_opener completely replaces the former
    opener; you should combine both handlers before installing ONE opener.

    --
    Gabriel Genellina
     
    Gabriel Genellina, Sep 19, 2008
    #1
    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. Josef Cihal
    Replies:
    0
    Views:
    873
    Josef Cihal
    Sep 5, 2005
  2. DavidADEW
    Replies:
    2
    Views:
    2,744
    DavidADEW
    Sep 1, 2006
  3. rockdale
    Replies:
    5
    Views:
    745
    Chad Scharf
    Jul 5, 2007
  4. urllib2 login help

    , Feb 21, 2009, in forum: Python
    Replies:
    1
    Views:
    2,226
    Joshua Kugler
    Feb 23, 2009
  5. ÊØÖê´ýÍÃ

    login with urllib2

    ÊØÖê´ýÍÃ, Aug 14, 2011, in forum: Python
    Replies:
    0
    Views:
    191
    ÊØÖê´ýÍÃ
    Aug 14, 2011
Loading...

Share This Page