I did notice this:
Quote:
This is a new feature in Beautiful Soup 4.4.0.)
What if you need to create a whole new tag? The best solution is to call the factory method BeautifulSoup.new_tag():
soup = BeautifulSoup("<b></b>", 'html.parser')
original_tag = soup.b
new_tag = soup.new_tag("a", href="http://www.example.com")
original_tag.append(new_tag)
original_tag
# <b><a href="http://www.example.com"></a></b>
new_tag.string = "Link text."
original_tag
# <b><a href="http://www.example.com">Link text.</a></b>
|
So my guess is that Sigil's internal version is not supporting adding the attributes the way you do with that method.