LoginSignup
Merasopo
@Merasopo (Mera Sopo)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

Beautiful SoupエラーCouldn't find a tree builder with the features you requested: html,parser. Do you need to install a parser library?

解決したいこと

Beautiful Soupで解析をしようとしたところ、以下のエラーがでる

Couldn't find a tree builder with the features you requested: html,parser. Do you need to install a parser library?

該当するソースコード

言語:python3.9

import requests
from bs4 import BeautifulSoup

#Webページを取得して解析する
load_url = "https://www.ymori.com/books/python2nen/test1.html"
html = requests.get(load_url)
soup = BeautifulSoup(html.content,"html,parser")

#HTML全体を表示する
print(soup)

自分で試したこと

lxmlをインストールした以下だとインストールはうまくいっている認識

pip install lxml
Collecting lxml
Downloading lxml-4.8.0-cp39-cp39-win_amd64.whl (3.6 MB)
---------------------------------------- 3.6/3.6 MB 3.0 MB/s eta 0:00:00
Installing collected packages: lxml
Successfully installed lxml-4.8.0

0

2Answer

Your answer might help someone💌