How use urllib.urlopen()?

Andreas Jung andreas at andreas-jung.com
Fri Dec 22 04:14:13 EST 2000


On Fri, Dec 22, 2000 at 05:16:42AM +0000, Gustaf Liljegren wrote:
> Can't get the urlopen() function to work. I have a script on a UNIX web 
> server that should go to another webpage when the user clicks a button. To 
> isolate the problem, I made a test script:
> 
> #!/usr/local/bin/python
> 
> import urllib
> u = urllib.urlopen("http://www.yahoo.com")
> print u.read()

This should work (and works on my machine) !
 
> When running this I get HTTP 500 - Internal server error. :-( 

Maybe a temporary problem at Yahoo...try another web site.

Andreas




More information about the Python-list mailing list