Given an (un)ordered list I have to check if special HTML arrows are being used (and replace them with Latex arrows). lxml.html is a requirement.
I was tinkering around but then I couldn't get past the following:
import lxml.html
my_string = "<li>I have a dream → Hello!</li>"
elem = lxml.html.fromstring(my_string)
if "→" in my_string: # True
print("foo")
if "→" in elem.text: # False
print("bar")
I am unable to understand why the second if-condition evaluates to False. How can I check if (& #8594;) "→" exists in elem.text?