Python3(Urllib)<;绑定方法HTTPResponse.read of<;http.client.HTTPResponse对象位于0x03281BD0>&燃气轮机;
这是我得到的错误:Python3(Urllib)<;绑定方法HTTPResponse.read of<;http.client.HTTPResponse对象位于0x03281BD0>&燃气轮机;,python,python-3.x,urllib,Python,Python 3.x,Urllib,这是我得到的错误: 如何修复此错误?我犯了什么错误?您看到的打印内容不是错误-您看到的是HTTPResponse实例方法字符串表示。要获取方法返回的内容,应调用它: 删除可能只是粘贴为文本(带有标记)的不必要图像 import urllib.request html = urllib.request.urlopen('http://jshawl.com/python-playground/') s = html.read print(s) s = html.read()
如何修复此错误?我犯了什么错误?您看到的打印内容不是错误-您看到的是
HTTPResponse
实例方法字符串表示。要获取方法返回的内容,应调用它:
删除可能只是粘贴为文本(带有标记)的不必要图像
import urllib.request
html = urllib.request.urlopen('http://jshawl.com/python-playground/')
s = html.read
print(s)
s = html.read()