Ich habe das Paket html5lib installiert. Ich bin sicher, weil, wenn ich versuche, es zu installieren, bekomme ich eine Nachricht, dass es bereits installiert ist.html5lib installiert aber BeautifulSoup kann es nicht finden
pip install html5lib
Requirement already satisfied: html5lib in ./anaconda/lib/python3.5/site-packages
Auch ich bin in der Lage, dieses Paket erfolgreich zu importieren.
import html5lib
Aber wenn ich versuche, den Parser als Teil des BeautifulSoup Konstruktor zu verwenden
soup = BeautifulSoup(response.data, 'html5lib')
Ich bin nicht erfolgreich
FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
Ist es möglich, BS4 zu zwingen, die installierte Nachschlag Parser und erfolgreich finden html5lib?
Ich, was Sie wollen '' html.parser'' anstelle von ''html5lib''. Wenn nicht und Sie eine intelligente Idee wie pycharm verwenden, starten Sie sie neu. – MegaIng
html5lib ist was ich suche. es ist anders als html.parser. siehe die Liste https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser –
Right Python-Versionen? – MegaIng