mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-18 06:06:06 -04:00
Convert HTML entities to unicode in long tweets. Fixes #118
This commit is contained in:
@@ -55,7 +55,11 @@ def is_long(tweet):
|
||||
def get_full_text(uri):
|
||||
try:
|
||||
r = requests.get("http://api.twishort.com/1.1/get.json", params={"uri": uri, "api_key": keys.keyring.get("twishort_api_key")})
|
||||
return r.json()["text"]
|
||||
msg = r.json()["text"]
|
||||
# Try to parse possible HTML entities.
|
||||
from twitter.compose import StripChars
|
||||
msg = StripChars(msg)
|
||||
return msg
|
||||
except:
|
||||
return False
|
||||
|
||||
|
Reference in New Issue
Block a user