I'm trying to download what is suppose to be a json file hosted in some github repo. Here's the link.
The problem is that when i try to decode the json with python i'm having the following error:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This sounds like an incorrect json formatting, so i when manually open the file in an editor, this is what i see:
This is not a json file, but that is what is supposed to be. Instead, i'm getting this tree-structured file. I need to load this into a dataframe using pandas. Could somebody please point me in the right direction here? what am i doing wrong?
This is the code i have used to get that file:
import urllib.request as r
from bs4 import BeautifulSoup as bs
import json
url = r.urlopen("https://raw.githubusercontent.com/aavail/ai-workflow-capstone/master/cs-train/invoices-2017-11.json")
content = url.read()
soup = bs(content)
newDictionary=json.loads(str(soup))
Thank you very much in advance
