using web services retrieving [{"created_at":"sat sep : : + ""id": ,"id_str":" ""text":" months after my freak bocce ball accidentmy wedding ring fits again:)\ \nhttps:\/\/ co\/ xmhpx kgx""source":"web","truncated":falseremaining enter twitter accountalong with the returned timeline datatwitter also returns metadata about the request in the http response headers one header in particularx-rate-limit-remaininginforms us how many more requests we can make before we will be shut off for short time period you can see that our remaining retrievals drop by one each time we make request to the api in the following examplewe retrieve user' twitter friendsparse the returned jsonand extract some of the information about the friends we also dump the json after parsing and "pretty-printit with an indent of four characters to allow us to pore through the data when we want to extract more fields import urllib requesturllib parseurllib error import twurl import json import ssl create app and get the four stringsput them in hidden py twitter_url 'ignore ssl certificate errors ctx ssl create_default_context(ctx check_hostname false ctx verify_mode ssl cert_none while trueprint(''acct input('enter twitter account:'if (len(acct )break url twurl augment(twitter_url{'screen_name'acct'count'' '}print('retrieving'urlconnection urllib request urlopen(urlcontext=ctxdata connection read(decode(js json loads(dataprint(json dumps(jsindent= )headers dict(connection getheaders()print('remaining'headers[' -rate-limit-remaining']