
July 19th, 2004, 04:28 PM
|
|
Registered User
|
|
Join Date: Oct 2003
Posts: 23
Time spent in forums: 3 h 44 m 17 sec
Reputation Power: 0
|
|
|
IO Error can't connect using urllib
Hello I am getting the following error when trying to connect to a website.
Here is the error:
File "C:\Python23\lib\httplib.py", line 548, in connect
raise socket.error, msg
IOError: [Errno socket error] (10061, 'Connection refused')
Here is the code that I am trying to run:
Code:
import urllib
page = urllib.urlopen('http://www.amazon.com').read()
open('amazon.txt', 'w').write(page)
I don't think my script is getting outside of my PC. Any Suggestions?
Thanks,
Chuck
|