Escape translated string before tweeting
This commit is contained in:
parent
3e541c5224
commit
ee9c3426ff
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ for status in timeline:
|
|||
tstring = translator.translate(intext, target_language=a[0])['translatedText'].replace("@", "@")
|
||||
|
||||
try:
|
||||
two.tweet(tstring[:140])
|
||||
two.tweet(html.parser.HTMLParser().unescape(tstring[:140]))
|
||||
tw_counter += 1
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
|
Loading…
Reference in a new issue