I get the error "TypeError: string indices must be integers" in the following code.
import json
import requests
url = "https://petition.parliament.uk/petitions/300139.json"
response = requests.get(url)
data = response.text
parsed = json.loads(data)
sig_count = data["attributes"]["signature_count"]
print(sig_count)