Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8633563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:30:44+00:00 2026-06-12T09:30:44+00:00

When I access a page on an IIS server to retrieve xml, using a

  • 0

When I access a page on an IIS server to retrieve xml, using a query parameter through the browser (using the http in the below example) I get a pop-up login dialog for username and password (appears to be a system standard dialog/form). and once submitted the data arrives. as an xml page.

How do I handle this with urllib? when I do the following, I never get prompted for a uid/psw.. I just get a traceback indicating the server (correctly ) id’s me as not authorized. Using python 2.7 in Ipython notebook

f = urllib.urlopen("http://www.nalmls.com/SERetsHuntsville/Search.aspx?SearchType=Property&Class=RES&StandardNames=0&Format=COMPACT&Query=(DATE_MODIFIED=2012-09-28T00:00:00%2B)&Limit=10")
s = f.read()
f.close()

Pointers to doc also appreciated! did not find this exact use case.

I plan to parse the xml to csv if that makes a difference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:30:45+00:00Added an answer on June 12, 2026 at 9:30 am

    You are dealing with http authentication. I’ve always found it tricky to get working quickly with the urllib library. The requests python package makes it super simple.

    url = "http://www.nalmls.com/SERetsHuntsville/Search.aspx?SearchType=Property&Class=RES&StandardNames=0&Format=COMPACT&Query=(DATE_MODIFIED=2012-09-28T00:00:00%2B)&Limit=10"
    r = requests.get(url, auth=('user', 'pass'))
    page = r.text
    

    If you look at the headers for that url you can see that it is using digest authentication:

    {‘content-length’: ‘1893’, ‘x-powered-by’: ‘ASP.NET’,
    ‘x-aspnet-version’: ‘4.0.30319’, ‘server’: ‘Microsoft-IIS/7.5’,
    ‘cache-control’: ‘private’, ‘date’: ‘Fri, 05 Oct 2012 18:20:54 GMT’,
    ‘content-type’: ‘text/html; charset=utf-8’, ‘www-authenticate’:
    ‘Digest realm=“Solid Earth”, nonce=”MTAvNS8yMDEyIDE6MjE6MjUgUE0″,
    opaque=”0000000000000000″, stale=false, algorithm=MD5, qop=”auth”‘}

    So you will need:

    from requests.auth import HTTPDigestAuth
    r = requests.get(url, auth=HTTPDigestAuth('user', 'pass'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using ASP.NET as programming language on IIS Server. the Database is access and i
I was trying to access a page using curl. I could access it perfectly
Is there a way to access the page HTML source code using javascript? I
For example, to access a page in my search folder, I have to write:
I have an IIS server with 4 sites configured, using host headers and sharing
Newbie IIS question: I want to setup HTTPS access for my XHTML page (not
When I try to access a page (default.aspx) in a web site in IIS
My group has been using BugTracker.NET (http://ifdefined.com/bugtrackernet.html) hosted on an Windows server running IIS.
Is there a way to access page controls from user control . I have
I am trying to access a page method from centralized module. I tried putting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.