query= twitter.search.tweets(q="",geocode="%f,%f,%dkm" % (latitude, longitude, max_range),num_results=100,max_id=last_id)
得到的结果,query的类型为:<class 'twitter.api.TwitterDictResponse'>
第一维长度为2:statuses、search_metadata
1、statuses:[{其中每一条包含如下内容},{},{},……]
(1)'created_at': 'Sat Feb 16 23:56:40 +0000 2019'
'id': 1096921334674870277,
'id_str': '1096921334674870277',
'text': '@Jakkeo1 @MikeGapes Spot on Jack',
'truncated': False,
'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'Jakkeo1', 'name': 'Jack #GTTO', 'id': 752913155416784897, 'id_str': '752913155416784897', 'indices': [0, 8]}, {'screen_name': 'MikeGapes', 'name': 'Mike Gapes', 'id': 15672615, 'id_str': '15672615', 'indices': [9, 19]}], 'urls': []}
'metadata': {'iso_language_code': 'en', 'result_type': 'recent'},
'source': '<a href="http://twitter.com/download/android" rel="nofollow">Twitter for Android</a>',
'in_reply_to_status_id': 1096917691649146880,
'in_reply_to_status_id_str': '1096917691649146880',
'in_reply_to_user_id': 752913155416784897,
'in_reply_to_user_id_str': '752913155416784897',
'in_reply_to_screen_name': 'Jakkeo1'
'user': {'id': 3362893185, 'id_str': '3362893185', 'name': 'Gary Cummins', 'screen_name': 'GaryCummins6', 'location': 'New Cross', 'description': 'Evertonian, Lewisham Unite Branch Sec, Lewisham council worker.', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': False, 'followers_count': 192, 'friends_count': 492, 'listed_count': 4, 'created_at': 'Mon Jul 06 19:36:45 +0000 2015', 'favourites_count': 1994, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 2419, 'lang': 'en', 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/751056406426619904/C6Lmrplu_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/751056406426619904/C6Lmrplu_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/3362893185/1467392537', 'profile_link_color': '1DA1F2', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': True, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}
'geo': {'type': 'Point', 'coordinates': [51.4757216, -0.0324715]},
'coordinates': {'type': 'Point', 'coordinates': [-0.0324715, 51.4757216]},
'place': {'id': '58f909abfd95e133', 'url': 'https://api.twitter.com/1.1/geo/id/58f909abfd95e133.json', 'place_type': 'city', 'name': 'Lewisham', 'full_name': 'Lewisham, London', 'country_code': 'GB', 'country': 'United Kingdom', 'contained_within': [], 'bounding_box': {'type': 'Polygon', 'coordinates': [[[-0.074547, 51.414087], [0.038567, 51.414087], [0.038567, 51.494127], [-0.074547, 51.494127]]]}, 'attributes': {}},
'contributors': None,
'is_quote_status': False,
'retweet_count': 0,
'favorite_count': 1,
'favorited': False,
'retweeted': False,
'lang': 'en'
2、search_metadata{每一项包含如下,……,……}
'completed_in': 0.043,
'max_id': 0,
'max_id_str': '0',
'next_results': '?max_id=1096904616980041727&q=&geocode=51.474144%2C-0.035401%2C1km&include_entities=1',
'query': '',
'count': 15,
'since_id': 0,
'since_id_str': '0'
实例
【用户主页】https://twitter.com/rbentuk
【推文主页】https://twitter.com/i/web/status/1096908406558838784