I'm trying to convert the page at https://lpl.qq.com/web201612/data/LOL_MATCH_DETAIL_7325.js to a json file so that I can parse it into a pandas table.
I'm using the python requests library and my function looks like this:
[1]def lpl_get_match_data(url, test):
[2] good_url = "https://lpl.qq.com/web201612/data/LOL_MATCH_DETAIL_7325.js"
[3] json_file = requests.get(good_url)
[4] json_content = json_file.json()
[5] if test == True:
[6] pprint.pprint(json_content)
[7] return(json_content)
When I run this function I get an error, "JSONDecodeError: Expecting value: line 1 column 1 (char 0)".
I did the obvious "google the error" and checked a bunch of the responses and it looked like in a lot of cases people had empty files or weren't getting responses. I tried changing line 3 to requests.get(good_url).content to confirm that I was getting the proper response and it looked like I was. I'm wondering if anyone could point me to why this page isn't readable as a json object.