exceptprint('no unretrieved twitter accounts found'continue elsecur execute('select id from people where name limit '(acct)tryid cur fetchone()[ exceptcur execute('''insert or ignore into people (nameretrievedvalues (? )'''(acct)conn commit(if cur rowcount ! print('error inserting account:'acctcontinue id cur lastrowid url twurl augment(twitter_url{'screen_name'acct'count'' '}print('retrieving account'accttryconnection urllib request urlopen(urlcontext=ctxexcept exception as errprint('failed to retrieve'errbreak data connection read(decode(headers dict(connection getheaders()print('remaining'headers[' -rate-limit-remaining']tryjs json loads(dataexceptprint('unable to parse json'print(databreak debugging print(json dumps(jsindent= )if 'usersnot in jsprint('incorrect json received'print(json dumps(jsindent= )continue cur execute('update people set retrieved= where name ?'(acct)countnew countold for in js['users']friend ['screen_name'