enter twitter accountor quitretrieving new accounts revisited enter twitter accountor quitretrieving new accounts revisited enter twitter accountor quitquit since we pressed enter ( we did not specify twitter account)the following code is executedif len(acct cur execute('select name from twitter where retrieved limit 'tryacct cur fetchone()[ exceptprint('no unretrieved twitter accounts found'continue we use the sql select statement to retrieve the name of the first (limit user who still has their "have we retrieved this uservalue set to zero we also use the fetchone()[ pattern within try/except block to either extract screen_name from the retrieved data or put out an error message and loop back up if we successfully retrieved an unprocessed screen_namewe retrieve their data as followsurl=twurl augment(twitter_url,{'screen_name'acct,'count'' '}print('retrieving'urlconnection urllib urlopen(urldata connection read(js json loads(datacur execute('update twitter set retrieved= where name ?',(acct)once we retrieve the data successfullywe use the update statement to set the retrieved column to to indicate that we have completed the retrieval of the friends of this account this keeps us from retrieving the same data over and over and keeps us progressing forward through the network of twitter friends if we run the friend program and press enter twice to retrieve the next unvisited friend' friendsthen run the dumping programit will give us the following output('opencontent' ('lhawthorn' ('steve_coppin' ('davidkocher' ('hrheingold' ('cnxorg' ('knoop'