From ff4655c314277d9c2c18bda56f07ac03d6972d76 Mon Sep 17 00:00:00 2001 From: ping Date: Thu, 8 Oct 2015 11:31:07 +0800 Subject: [PATCH] Fix html_for_tweet for pre-quote implementation tweet html --- twython/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twython/api.py b/twython/api.py index 3805e2f..2ed50bc 100644 --- a/twython/api.py +++ b/twython/api.py @@ -597,7 +597,7 @@ class Twython(EndpointsMixin, object): text = text.replace(tweet['text'][start:end], url_html % (entity['url'], shown_url)) - if expand_quoted_status and tweet['is_quote_status']: + if expand_quoted_status and tweet.get('is_quote_status'): quoted_status = tweet['quoted_status'] text += '
%(quote)s' \ '%(quote_user_name)s' \