Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HTML entity convert
# reference: https://stackoverflow.com/questions/2087370/decode-html-entities-in-python-string
from bs4 import BeautifulSoup
BeautifulSoup("<p>&pound;682m</p>")
# output is like:
# <html><body><p>£682m</p></body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment