I want all the the data of response section
CodePudding user response:
You are already getting the correct output at page = requests.get(url, headers=header)
and you are printing output of response = requests.get(url)
where you are not passing header. Also authorization key does not change here.
You can use the following code to get package and price.
op={}
page = requests.get(url, headers=header)
for d in page.json().get("data"):
for service in d.get("services"):
for package in service.get("package_details"):
op[service.get("name")]=package.get("total")
print(op)
output:
{'Basic Service': 3199, 'Standard Service': 4199, 'Comprehensive Service': 5499}