0
Traceback (most recent call last):
  File "<pyshell#27>", line 1, in <module>
    server = NNTP('http://www.news.readfreenews.net')
  File "C:\Python27\lib\nntplib.py", line 112, in __init__
    self.sock = socket.create_connection((host, port))
  File "C:\Python27\lib\socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno 11001] getaddrinfo failed
>>> 

你能帮忙吗

4

1 回答 1

2

您正在使用 HTTP 连接到 NNTP?替换server = NNTP('http://www.news.readfreenews.net')server = NNTP('news.readfreenews.net')or server = NNTP('www.news.readfreenews.net'),具体取决于哪个工作正常。

于 2011-04-14T16:54:38.530 回答