Why it doesn't work?

作業のメモ、記録をブログに残しています。

Python BeautifulSoup4でパーサーとしてlxmlを指定するとエラーが発生する

PythonでWebwebスクレイピングに挑戦していますが、
BeautifulSoupを実行時に、パーサーとして"lxml"を指定すると下記エラーが発生しました。

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

エラーメッセージ通り、LXMLパーサーをインストールすることで解決できました。

pip install lxml

参考:
Beautiful Soup Documentation — Beautiful Soup 4.4.0 documentation

ソースコードはまた改めて。今日はこれだけ。