You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
umbrella pagination with get request not working - EnforcementGetRequest.py #47
# keep doing GET requests, until looped through all domains
while True:
req = requests.get(url_get)
json_file = req.json()
for row in json_file["data"]:
domain_list.append(row["name"])
# GET requests will only list 200 domains, if more than that, it will request next bulk of 200 domains
if bool(json_file["meta"]["next"]):
Url = json_file["meta"]["next"]
# break out of loop when finished
else:
break
Fixed code
# keep doing GET requests, until looped through all domains
while True:
req = requests.get(url_get)
json_file = req.json()
for row in json_file["data"]:
domain_list.append(row["name"])
# GET requests will only list 200 domains, if more than that, it will request next bulk of 200 domains
if bool(json_file["meta"]["next"]):
url_get = json_file["meta"]["next"]
# break out of loop when finished
else:
break
Activity