Good day to all, I apologize in advance for a possible stupid question, I am quite a novice. There is a code that extracts statuses from Twitter for a specific search query. It is necessary to catch a lot of statuses, but I just can not understand something how to loop through the json file :( thanks in advance!
import urllib.request as ur from twurl import augment import json import re url = augment('https://api.twitter.com/1.1/search/tweets.json?q=python', {'count': '2'} ) connection = ur.urlopen(url) data = connection.read().decode('utf-8') info = json.loads(data) status = info["statuses"] #print (json.dumps(status, indent=4)) #как записать циклом следующие строчки? print ('Status 1:',info["statuses"][0]["text"].encode("utf-8")) print ('Status 2:',info["statuses"][1]["text"].encode("utf-8"))