Here is my code:
import re, json, requests
url = 'https://github.com/caminofinancial/data-eng-take-home/blob/master/prequalresult.json'
resp = requests.get(url)
resp_parsed = re.sub(r'^jsonp\d+\(|\)\s+$', '', resp.text)
data = json.loads(resp_parsed)
print(data)
And I Got the error : JSONDecodeError: Expecting value: line 7 column 1 (char 6). Can someone check it and solve the issue?
Use the raw GitHub URL when you need to access the file directly. You can get it by clicking the 'Raw' button on the page.
url = 'https://raw.githubusercontent.com/caminofinancial/data-eng-take-home/master/prequalresult.json'
resp = requests.get(url)
data = json.loads(resp.text)
print(data)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With