Hi,
I get an error, when I am trying to download URL with using Cookies.
Where is the Problem?
Thank u very much for all ideas!!!
sincerely
Josef
import os, cookielib, urllib2
cj = cookielib.Mozil laCookieJar()
os.environ["http_proxy "] = "http://proxy.irm.at:12 34"
os.environ['HOME']= r"C:\tmp\COOKIE "
#
cj.load(os.path .join(os.enviro n["HOME"], "cookies.tx t"))
opener = urllib2.build_o pener(urllib2.H TTPCookieProces sor(cj))
r = opener.open("ht tp://brokerjet.ecetr a.com/at/news/?/")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Programme\P ython24\lib\url lib2.py", line 358, in open
response = self._open(req, data)
File "C:\Programme\P ython24\lib\url lib2.py", line 376, in _open
'_open', req)
File "C:\Programme\P ython24\lib\url lib2.py", line 337, in _call_chain
result = func(*args)
File "C:\Programme\P ython24\lib\url lib2.py", line 1021, in http_open
return self.do_open(ht tplib.HTTPConne ction, req)
File "C:\Programme\P ython24\lib\url lib2.py", line 996, in do_open
raise URLError(err)
urllib2.URLErro r: <urlopen error (10061, 'Connection refused')> 0 2810 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bmiras |
last post by:
I've got a problem using urllib2 to get a web page.
I'm going through a proxy using user/password authentification
and i'm trying to get a page asking for a HTTP authentification.
And I'm using python 2.3
Here is an exemple of the piece of code I use:
import urllib2
#Proxy handler
proxy_handler = urllib2.ProxyHandler({"http" :
|
by: Fazer |
last post by:
Hello,
I was wondering what's the best way of setting timeouts when working with urllib2.
Thanks,
|
by: Catalin Marinas |
last post by:
Hi,
I was trying to use the HTTPBasicAuthHandler with an MS web server
requiring authentication (basic) but without success. I digged a bit
in the urllib2 module (python 2.3.4) and it turned out to be a problem
with the regular expression matching in the
AbstractBasicAuthHandler.http_error_auth_reqed() function. The
rx.match() cannot be...
|
by: Volker M. |
last post by:
Hey,
I want to open a list of URLs with Pythons urllib and the fuction
open(URL) automatically. It is important that the program open ONLY
normal http-sites and no https-sites with user/password-request.
So exists a possibility that I could cancel all site requests with
user/password-dialogues?
Thx
|
by: Pascal |
last post by:
Hello,
I want to acces my OWA (Outlook Web Acces - http Exchange interface)
server with urllib2 but, when I try, I've always a 401 http error.
Can someone help me (and us)?
Thanks.
here's my pyscript:
| |
by: Robert |
last post by:
using a proxy and https/SSL together I get the following SSL error :
File "dscore.pyo", line 2257, in UrlOpenEx
File "ClientCookie\_urllib2_support.pyo", line 572, in open
File "ClientCookie\_urllib2_support.pyo", line 472, in http_response
File "ClientCookie\_urllib2_support.pyo", line 589, in error
File "urllib2.pyo", line 304, in...
|
by: Ant |
last post by:
Hi all,
I have just moved to a new machine, and so have installed the latest
version of Python (2.4.3 - previously I believe I was running 2.4.2).
Unfortunately this seems to have broken urllib2...
An app I wrote for testing our web application makes heavy use of
urllib2 against the localhost, and I am getting the following problem...
|
by: Jack |
last post by:
I'm trying to use a proxy server with urllib2.
So I have managed to get it to work by setting the environment
variable:
export HTTP_PROXY=127.0.0.1:8081
But I wanted to set it from the code. However, this does not set the proxy:
httpproxy = '127.0.0.1:3129'
proxy_support = urllib2.ProxyHandler({"http":"http://" + httpproxy})
opener =...
|
by: Rob Wolfe |
last post by:
"Miguel Beltran R." <yourpadre@gmail.comwrites:
You forgot to add the authentication handler to the list of handlers.
See below.
Add here:
opener.add_handler(aut))
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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...
| |
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. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |