只能是sina吗?
Topic sourced=s.recv(1024)为什么会出现 Traceback (most recent call last): File "D:\PythonPractic\TCP.py", line 9, in <module> d=s.recv(1024) error: [Errno 10054]
我换成www.douban.com 运行结果是这样的: HTTP/1.1 403 Forbidden Server: dae Date: Sat, 26 Dec 2015 13:25:16 GMT Content-Type: text/html Content-Length: 160 Connection: close
之前试的新浪和百度都是正常的,第一句都是 HTTP/1.1 200 OK 而豆瓣是Forbodden, 不知道为什么。
- 1
L0standfound
这个sina主页有什么特别的么? 为什么我把sina.com.cn换成douban.com就会报错呢? 报错信息如下: Traceback (most recent call last): File "untitled.py", line 27, in <module> header, html = data.split(b'\r\n\r\n', 1) ValueError: need more than 1 value to unpack