Hi Tim, really than u very much!
I think u have helped me! I will try, that what u said. I have found probably simplier solution. Is it so? ...but without success:-(. I want to download some URLs via python script. With some URLs I have success with some NOT. Why? I do following: =============== 1. Login to https://brokerjet.ecetra.com/at/welcome/register/loginpage.phtml via Mozzila browser 2. I try to download some URLs using cookies: see script bellow: 3. Some pages works (e.g. news, but on some pages I get: -- Traceback (most recent call last): File "test_stock.py", line 11, in ? r = opener.open("https://brokerjet.ecetra.com/at/trading/wt.phtml?isin=NL0000240000&exid=ETR") File "C:\Programme\Python24\lib\urllib2.py", line 358, in open response = self._open(req, data) File "C:\Programme\Python24\lib\urllib2.py", line 376, in _open '_open', req) File "C:\Programme\Python24\lib\urllib2.py", line 337, in _call_chain result = func(*args) File "C:\Programme\Python24\lib\urllib2.py", line 1029, in https_open return self.do_open(httplib.HTTPSConnection, req) File "C:\Programme\Python24\lib\urllib2.py", line 996, in do_open raise URLError(err) urllib2.URLError: <urlopen error (10061, 'Connection refused')> Details- Script: ================= I make login via Mozilla browser import os, cookielib, urllib2 cj = cookielib.MozillaCookieJar() os.environ['HOME']= r"C:\tmp\COOKIE" cj.load(os.path.join(os.environ["HOME"], "cookies.txt")) opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) # first URLs download works r = opener.open("http://brokerjet.ecetra.com/at/news/index.phtml?notation=7536885") # second URLs download DOES NOT work ... WHY? r = opener.open("https://brokerjet.ecetra.com/at/trading/wt.phtml?isin=NL0000240000&exid=ETR") # h = r.readlines() g = open("test.html","w") g.writelines(h) g.close() os.system("test.html") Thans realy for all ideas! sincerely mark > --- Ursprüngliche Nachricht --- > Von: Tim Roberts <[EMAIL PROTECTED]> > An: python-list@python.org > Betreff: Re: connect to https unpossible. Please help. > Datum: Fri, 21 Oct 2005 06:05:45 GMT > > "Mark Delon" <[EMAIL PROTECTED]> wrote: > > > >i want to log via python script to https page: > > > >'https://brokerjet.ecetra.com/at/' > ># > >But it does not work. > > > >I am using following code(see below) > > > >Has somebody any ideas? > >How can I get to this https page? > >Need I to know some infos from "provider"(certificates, etc)? > >Thank u very much ! > > You are trying to set this up to use HTTP BasicAuth authorization, but > this > page is not using HTTP authorization. You can recognize HTTP > authorization > by the separate browser window that pops up to ask for your username and > password. > > In this case, the username and password fields are just ordinary fields on > a form. What you need to do is read the HTTP on that page, and figure out > howfiues for those fields. In this case, the > form data goes to > https://brokerjet.ecetra.com/at/welcome/loginaction.phtml, and you'll need > to encode 'login' and 'pwd' fields in the POST data. > > However, that isn't the end of your trouble. That page will almost > certainly send you a cookie, which you will need to send back with every > request. > -- > - Tim Roberts, [EMAIL PROTECTED] > Providenza & Boekelheide, Inc. > -- > http://mail.python.org/mailman/listinfo/python-list > -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie -- http://mail.python.org/mailman/listinfo/python-list