I am new to Django and I am using twython library for twitter search. I am getting json file where 'u' character is added before to key for eg.
{u'search_metadata': {u'count': 15, u'completed_in': 0.028, u'max_id_str': u'640844327904800768', u'since_id_str': u'0', u'refresh_url': u'?since_id=640844327904800768&q=kjitu9&include_entities=1', u'since_id': 0, u'query': u'kji', u'max_id': 640844327904800768}, u'statuses': [{u'contributors': None, u'truncated': False, u'text': u'@aaa I just thought seeing as you were setting goals it may help you, would love to know your thoughts - http://t.co/dEjAct', u'is_quote_status': False, u'in_reply_to_status_id': None, u'id': 640844327904800768, u'favorite_count': 0, u'source': u'mention\xa0', u'retweeted': False, u'coordinates': None, u'entities': {u'symbols': [], u'user_mentions': [{u'id': 363525191, u'indices': [0, 7], u'id_str': u'363525191', u'screen_name': u'kjit', u'name': u'Ji'}], u'hashtags': [], u'urls': [{u'url': u'http://t.co/dEjActDuCX', u'indices': [108, 130], u'expanded_url': u'http://freedawn.com', u'display_url': u'freedawn.com'}]}
parser = Parser()
twitter = Twython(settings.TWITTER_CONSUMER_KEY,
settings.TWITTER_CONSUMER_SECRET,
settings.TWITTER_OAUTH_TOKEN,
settings.TWITTER_OAUTH_TOKEN_SECRET)
try:
user_timeline = twitter.search(q=settings.TWITTER_USER)
print user_timeline
except TwythonError as e:
return {"latest_tweet": e}
print user_timeline