導(dǎo)入庫:
from bs4 import BeautifulSoup
解析器:
'html.parser':
'lxml'
'lxml-xml'
'html5lib'
對(duì)網(wǎng)頁進(jìn)行析取時(shí)傻粘,沒有規(guī)定解析器時(shí)赏廓,默認(rèn)的解析器“html.parser”挡育。
導(dǎo)入庫:
from bs4 import BeautifulSoup
解析器:
'html.parser':
'lxml'
'lxml-xml'
'html5lib'
對(duì)網(wǎng)頁進(jìn)行析取時(shí)傻粘,沒有規(guī)定解析器時(shí)赏廓,默認(rèn)的解析器“html.parser”挡育。