How to decode HTML entities in Python

Decoding HTML entities replaces HTML entities with the original HTML-reserved character. For example, decoding “&lt;body&gt;” results in “<body>”.

Solution for How to decode HTML entities in Python : You can use html.unescape() to decode HTML entities Call html.unescape(input) to decode the input string.


how-to-decode-html-entities-in-python