You have an HTML escape there. Use the HTMLParser.HTMLParser()
class to unescape these:
from HTMLParser import HTMLParser
parser = HTMLParser()
unescaped = parser.unescape(escaped)
Demo:
>>> from HTMLParser import HTMLParser
>>> parser = HTMLParser()
>>> escaped = '‘The zoom animations everywhere on the new iOS 7 are literally making me nauseous and giving me a headache,’wroteforumuser Ensorceled.'
>>> parser.unescape(escaped)
u'\u2018The zoom animations everywhere on the new iOS 7 are literally making me nauseous and giving me a headache,\u2019wroteforumuser Ensorceled.'
>>> print parser.unescape(escaped)
‘The zoom animations everywhere on the new iOS 7 are literally making me nauseous and giving me a headache,’wroteforumuser Ensorceled.
In Python 3, the HTMLParser
module has been renamed to html.parser
; adjust the import accordingly:
from html.parser import HTMLParser