I have tried calling the APIS but many of them are missing so I am not able to execute the loop properly.
And I am not able to convert into CSV File
import requests
def get_joke(i):
surl=“http://api.icndb.com/jokes/”
g=str(i)
url = surl+g
#print(url)
resp = requests.get(url)
resp.encoding = “utf-8”
data = resp.json()
print(data[“value”][“joke”])
for i in range(1,500):
if i==7 or i==8 or i==9 or i==10 or i==11:
continue
get_joke(i)