Last active
August 3, 2020 01:21
-
-
Save korakot/b436c4906d7b60bdfc20c6eebfc5a4dd to your computer and use it in GitHub Desktop.
Using lxml with BeautifulSoup in Colab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install lxml | |
import bs4 | |
import bs4.builder._lxml | |
bs4.builder.register_treebuilders_from(bs4.builder._lxml) | |
# then you can | |
soup = BeautifulSoup(data, 'lxml') # no error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment