mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
Resolved issue of emoji in unicode
This commit is contained in:
parent
32f3eccc70
commit
18f43de98f
3
twoot.py
3
twoot.py
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue
Block a user