# BeautifulSoup 常用的網頁解析器 BeautifulSoup(html, "html.parser") # → 速度中等,容錯率強,python內建資料庫 BeautifulSoup(html, "lxml") # → 速度快,但須裝C語言套件 BeautifulSoup(html, "xml") # → 速度快,但須裝C語言套件 BeautifulSoup(html, "html5lib") # → 速度慢,容錯率最強,不須安裝額外套件 # 常見 error BeautifulSoup: object of type 'Response' has no len() # 解決方法如下: res = requests.get(url).content
BeautifulSoup 常用的網頁解析器 - Python 教學筆記本
2021/12/25
取消
查看更多推薦