473,786 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to configure proxy authentication when using urllib2?

I use a HTTP proxy to connect to Internet. When I run ulropen command I
get HTTP Error 407: Proxy authorization required. Could anybody tell me
how to resolve this? Thanks!

Feb 19 '06 #1
2 7762
I want to know that, too!

Feb 19 '06 #2
Licheng Fang napisa³(a):
I use a HTTP proxy to connect to Internet. When I run ulropen command I
get HTTP Error 407: Proxy authorization required. Could anybody tell me
how to resolve this? Thanks!


You can build and install opener instance, then all urllib2 calls will
use it.

Some information:
http://www.voidspace.org.uk/python/a....shtml#proxies, one
of many cookbook recipes:
http://aspn.activestate.com/ASPN/Coo.../Recipe/456195.
Generally, there's much more to google on this topic.

--
Jarek Zgoda
http://jpa.berlios.de/
Feb 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2939
by: Herman Geldenhuys | last post by:
Hey. Im trying to post some variables to an URL, but I get an error saying that my XML is parsed incorrectly. I know that it is not. At closer inspection I found out that some module in Python must be screwing up my request when I try to send it. Previously the code worked fine, but the problem occured when I included the proxy/authentication code, so that must be what is messing around with my request.
0
2656
by: jacob c. | last post by:
When I request a URL using urllib2, it appears that urllib2 always makes the request using HTTP 1.0, and not HTTP 1.1. I'm trying to use the "If-None-Match"/"ETag" HTTP headers to conserve bandwidth, but if I'm not mistaken, these are HTTP 1.1 headers, so I can't reasonably expect a web server to respond correctly to my requests. (In my limited testing, it looks like some servers respond correctly with an HTTP 304 status, while some...
2
1640
by: Brett Smith | last post by:
I currently I am using integrated windows authentication, (anonymous access disabled), with impersonation on my asp.net app. I would like to implement forms authentication against AD, but I have not found a way to then have the proper AD user authenticated on the SQL server. If I enable anonymous access and then specify a user that had rights to the SQL server I can make the calls but I loose any audit trail or SQL server level rights...
4
1176
by: david.moran | last post by:
Hi Our site is hosted at www.data-visualzation-software­.com and forms authentication works fine. We have just set up a redirect from www.apricot-software.com to this site and when this way is used to access the site, the logon just seems to circle round - you enter your details, press the Logon button and you go back to the logon prompt page. I've created a test account for anyone who wants to give it a go:
2
11433
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me out: I've a win32 service in C# on a client machine A, which accesses a WS (C#) on a server machine B (hosted on an IIS) Case 1: If I try to add the WSDL for the WS through VS2005, the 'Discovery
4
1218
by: jdvolz | last post by:
I have a script that uses urllib2 to repeatedly lookup web pages (in a spider sort of way). It appears to function normally, but if it runs too long I start to get 404 responses. If I try to use the internet through any other programs (Outlook, FireFox, etc.) it will also fail. If I stop the script, the internet returns. Has anyone observed this behavior before? I am relatively new to Python and would appreciate any suggestions. ...
3
4194
by: poolboi | last post by:
hi all, i've trouble installing module net::Telnet i used to be able to install all my modules on windows XP using ppm but all of a suddent i get the error: "407 proxy authentication required"
1
3373
by: Magnus.Moraberg | last post by:
Hi, I have the following code - import urllib2 from BeautifulSoup import BeautifulSoup proxy_support = urllib2.ProxyHandler({"http":"http:// 999.999.999.999:8080"}) opener = urllib2.build_opener(proxy_support)
0
998
by: Satish Vishwakarma | last post by:
Hello All, I have 2 Web applications in the same IIS with the virtual directory structure below: http://www.mydomain.com/site1 http://www.mydomain.com/site2 both site1 an site2 are using form authentication and creating the token further adding in cookie as below, FormsAuthentication.Initialize();
0
9496
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.