但我找不到任何回应数据
import requests
import json
def call_api():
url = "https://api.apitest.com/api/v2/intelligence/?&q=((status='status') and (confidence>=confidence) and (country='country'))"
api_key ="apikey"
user = "user@user.co.th"
headers = {
"Content-Type": "application/json",
"Authorization": "apikey " + user + ":" + api_key,
}
response = requests.get(url, headers=headers, verify=False)
if response.status_code != 200:
return {}
return response.json()
results = []
while True:
result = call_api()
if result.get("meta", {}).get("next") is None:
break
results.append(result)