]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/util.py
Another removal of term encoding (py3_only)
[z_archive/twitter.git] / twitter / util.py
index 70ff7a5f0b5b7541341e28723a576450bb9a28fb..76283cdeafe0cb0003769d8ef775cae4f6b577a3 100644 (file)
@@ -7,11 +7,11 @@ Internal utility functions.
 
 
 import re
-from htmlentitydefs import name2codepoint
+from html.entities import name2codepoint
 
 def htmlentitydecode(s):
     return re.sub(
         '&(%s);' % '|'.join(name2codepoint), 
-        lambda m: unichr(name2codepoint[m.group(1)]), s)
+        lambda m: chr(name2codepoint[m.group(1)]), s)
 
 __all__ = ["htmlentitydecode"]