1. Olivier Lauzanne
  2. pyquery
  3. Issues
Issue #50 wontfix

Unable to use user:pass@domain types of URLs requiring authentication

Anonymous created an issue

Hello, just wanted to report a little problem I'm experiencing. First of all, loving pyquery, thanks, it's great.

I'm writing some code to test to ensure regressions don't happen between my live and staging websites. My staging website is password protected using standard http auth.

I thought that using a URL such as http://user:password@domain/ would work but I get an error from httplib:

httplib.InvalidURL: nonnumeric port: '...'

It takes the first : separating the user and password and assumes that is the port. I realize this is not pyquery causing the problem but simply deferring it to urllib2.

I'm working through the docs for the best way to deal with this and will post a reply back here that you may be able to add to your documentation to make it more complete for these situations.

Of course, if you know something that works I'd be happy to hear about it.

Comments (1)

  1. Log in to comment