Skip to content

Instantly share code, notes, and snippets.

@korakot
Last active August 3, 2020 01:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korakot/b436c4906d7b60bdfc20c6eebfc5a4dd to your computer and use it in GitHub Desktop.
Save korakot/b436c4906d7b60bdfc20c6eebfc5a4dd to your computer and use it in GitHub Desktop.
Using lxml with BeautifulSoup in Colab
!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