How to access a web site with an authentication template.

Discussion in 'Python' started by Anthra Norell, Mar 17, 2010.

  1. Hi all,

    I have spent the better part of this day reading docs and googling
    archives to no avail. About this: I understand that I can access
    password protected sites with urllib2. However, the protocol seems to
    be: I try without password and catch the error coming back. The header
    will then tell me what the server expects in the line of formats. That
    doesn't work with a site I am dealing with, because the opening page
    does not require a password. It presents an id/password entry template
    and I have no clue how to respond in python. The page source is chock
    full of java script. The header--if that means anything--is:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang = "en-us">

    <head id="ctl00_Head1"><meta http-equiv="Content-Type"
    content="text/html; charset=UTF-8" />
    <link id="ctl00_glbalLayoutCSS" rel="stylesheet" type="text/css"
    href="/cve/p/6/Default/Styles/global_layout.css" />
    .... more CSS
    <!-- Site level default. The only time a firm.css is required is for
    segment variations. -->

    I don't expect solutions, but rather pointers to relevant reading.

    Thanks

    Frederic
     
    Anthra Norell, Mar 17, 2010
    #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. mike kim
    Replies:
    2
    Views:
    565
    clintonG
    Aug 20, 2003
  2. Tiddley-Pom
    Replies:
    5
    Views:
    443
    Mark Parnell
    Oct 15, 2003
  3. mark4asp
    Replies:
    1
    Views:
    1,201
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 24, 2007
  4. Replies:
    0
    Views:
    461
  5. Peter K
    Replies:
    2
    Views:
    332
    Peter K
    May 29, 2008
Loading...

Share This Page