]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/util.py
Remove agent cruft. Default to api.twitter.com and version 1.
[z_archive/twitter.git] / twitter / util.py
index 3dca53e6807cb0f7e0e512500b134209d2e529c3..b6e95c6903c7bab15dce3ef56c83eaff4b3cbf19 100644 (file)
@@ -7,7 +7,10 @@ Internal utility functions.
 
 
 import re
-from html.entities import name2codepoint
+try:
+    from html.entities import name2codepoint
+except ImportError:
+    from htmlentitydefs import name2codepoint
 
 def htmlentitydecode(s):
     return re.sub(