问题:当我尝试执行脚本时,BeautifulSoup(html, ...)给出错误消息"TypeError:类型'对象的对象'没有len().我尝试将实际的html作为参数传递,但它仍然不起作用.
import requests
url = 'http://vineoftheday.com/?order_by=rating'
response = requests.get(url)
html = response.content
soup = BeautifulSoup(html, "html.parser")
Run Code Online (Sandbox Code Playgroud)