Skip to content

Commit

Permalink
This fixes the unicode problem, but now ampersand is printing as unes…
Browse files Browse the repository at this point in the history
…caped HTML. (#34)
  • Loading branch information
ianpaul authored and cmdln committed Jan 2, 2018
1 parent 4e26ba8 commit 434161f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flashbake/plugins/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ def addcontext(self, message_file, config):
public_tweets = api.user_timeline(screen_name = self.username, count = self.tweet_limit, tweet_mode='extended')
for tweet in public_tweets:
if hasattr(tweet, 'retweeted_status'):
message_file.write('RT @' + tweet.retweeted_status.user.screen_name + ': ' + tweet.retweeted_status.full_text.encode('utf-8') + '\n')
message_file.write(unicode('RT @' + tweet.retweeted_status.user.screen_name + ': ' + tweet.retweeted_status.full_text).encode('utf-8') + '\n')
else:
message_file.write('By Me: ' + tweet.full_text.encode('utf-8') + '\n')
message_file.write(unicode('By Me: ' + tweet.full_text).encode('utf-8') + '\n')

0 comments on commit 434161f

Please sign in to comment.