Resolved issue of emoji in unicode

This commit is contained in:
JC Francois 2019-08-01 15:18:40 +02:00
parent 32f3eccc70
commit 18f43de98f

View File

@ -95,7 +95,8 @@ def cleanup_tweet_text(tt_iter):
uni_list = uni_str.split('-')
# Extract individual unicode chars and add them to the tweet
for uni_char in uni_list:
tweet_text += '&#x' + uni_char + ';'
# convert string to hex value of unicode character
tweet_text += chr(int(uni_char, 16))
else:
print("*** WARNING: No handler for tag in twitter text: " + tag.prettify())