BeautfilSoup()接受哪些参数来创建BeautifulSoup对象?

时间:2018-02-12 05:42:18

标签: python beautifulsoup urlopen

我怎么知道BeautifulSoup()接受httpResponse对象,当BeautifulSoup文档没有提到它时,urlopen()会返回该对象?

有人可以详细说明BeautifulSoup()接受的参数类型范围吗?

from bs4 import BeautifulSoup
from urllib.request import urlopen

html = urlopen("http://en.wikipedia.org/wiki/Kevin_Bacon")
soup = BeautifulSoup(html, 'html.parser')

0 个答案:

没有答案