I am trying to extract an attribute containing an invalid unescaped quote:
<meta content="mal"formed">
When using BeautifulSoup:
soup.find('meta')['content']
And as expected, the result will be mal.
Is there a way to make BeautifulSoup consider an unscreened quote as part of the attribute, so there will be a result mal"formed?
Tzach source
share