Fix issue where is_quote_status is true but there is no quoted_status #411

Merged
ping merged 1 commit from quoted-status-patch2 into master 2016-04-30 02:14:31 -07:00
Showing only changes of commit 99e9cebdc3 - Show all commits

View file

@ -597,7 +597,7 @@ class Twython(EndpointsMixin, object):
text = text.replace(tweet['text'][start:end], text = text.replace(tweet['text'][start:end],
url_html % (entity['url'], shown_url)) url_html % (entity['url'], shown_url))
if expand_quoted_status and tweet.get('is_quote_status'): if expand_quoted_status and tweet.get('is_quote_status') and tweet.get('quoted_status'):
quoted_status = tweet['quoted_status'] quoted_status = tweet['quoted_status']
text += '<blockquote class="twython-quote">%(quote)s<cite><a href="%(quote_tweet_link)s">' \ text += '<blockquote class="twython-quote">%(quote)s<cite><a href="%(quote_tweet_link)s">' \
'<span class="twython-quote-user-name">%(quote_user_name)s</span>' \ '<span class="twython-quote-user-name">%(quote_user_name)s</span>' \