Answer the question
In order to leave comments, you need to log in
How to tell python to read received text from website in json format?
Through the api site market.csgo.com I get the text:
kp_online_req = requests.get("https://market.csgo.com/api/v2/ping?key=" + api)
print(kp_online_req.text)
Answer the question
In order to leave comments, you need to log in
kp_online_req = requests.get("https://market.csgo.com/api/v2/ping?key=" + api).json()
print(kp_online_req['success'])
import requests
import json
kp_online_req = requests.get("https://market.csgo.com/api/v2/ping?key=" + api)
json_ = json.loads(kp_online_req.text)
print(json_)
the received text from the site must be read in json format
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question