urllib.urlopen doesn't work

Josef Cihal josef.cihal at gmx.at
Sat Sep 3 00:09:44 CEST 2005


i need a help with module URLLIB.

I am trying to open url via:
-    urllib.urlopen 

Problem is, that I am always redirecting to 
- LOGIN page (www.brokerjet.at),
and cannot get my page with "news", which I want to download.

Can it be, that I forgot to pass all (hidden too) parameters to form by submit?

Is it possible to get (ask) for all existing valid parameters, which I need to pass to form 
for getting requested page?
Is action submit correct in my case?

Thank you very much for all your help or ideas

Code (Python 2.3.3, Windows)
import urllib2, os,sys, urllib

x = urllib.urlopen( 'http://brokerjet.ecetra.com/at/markets/stocks/indices.phtml?notation=92866',
     urllib.urlencode({ 'iNotation':'92866',
                              'action': 'Submit'}))

data = x.readlines()
f = open(r"C:\Tmp\Brokerjet\login.html","w")


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050903/aac9a7fb/attachment.html>

More information about the Python-list mailing list