X
X
Xacker_Name2022-01-26 10:48:19
Python
Xacker_Name, 2022-01-26 10:48:19

How to get price from get request?

Hi, how can I get the price on request

"https://365sms.ru/stubs/handler_api.php?api_key=api_token&action=getPrices&service=vk&country=0"

I created a request (specified above) and received an answer: how can I get the price\cost?
"{"0":{"vk":{"cost":13.5,"count":34370}}}"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2022-01-26
@rt2233

https://docs.python.org/3/library/json.html
https://docs.python.org/3/tutorial/datastructures....

A
alekssamos, 2022-01-28
@alekssamos

>>> import json
>>> print( json.loads('{"0":{"vk":{"cost":13.5,"count":34370}}}')["0"]["vk"]["cost"] )
13.5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question