url = "https://data.variflight.com/analytics/CodeQuery"
data = {"key":"PEK","page":0}
res = requests.request("post",url,data=data)
res = res.content.decode("utf-8")
b =json.loads(res)
print(b)
爬取到的信息使用json.loads转换为json时出错,
File "C:\python\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\python\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)