Whitelist request

its where you can get a random cat photo its api is at

it returns a json response:


and 'file' is the url to the cute cat photo

Here is some code that can grab x amount of photos:

import json
from urllib.request import urlretrieve  # Python 3
import urllib3

r = 1
c = input("how many cat photos?")
c = int(c)
while r < c+1:
     http = urllib3.PoolManager()
     j = http.request('GET','')
    data = json.loads(
    link = data['file']
    filename = link.split('/')[-1]
    urlretrieve(link, filename)
    print("Finished number:"+str(r))
    r = r + 1

No problem! I see there's a link to the API on the front page for the domain, so I've whitelisted that now.