Unanswered
Does Anyone Have
offset = 0
limit = 500
all_data = []
while True:
params = {
'offset': offset,
'limit': limit
}
response = requests.get(url, headers=headers, params=params,verify=False)
data = response.json()
projects = data['data']['projects']
print(f"pulled {len(projects)} projects.")
if len(projects) == 0:
print("no project found - exiting ...")
break
all_data.extend(projects)
offset += limit
print(f"pulled {len(projects)} projects, total of: {len(all_data)}")
it keeps pulling 500 and looping
who can help me find my bug 🙂
14 Views
0
Answers
2 months ago
2 months ago