A
A
Alex Fedorov2021-10-08 13:40:33
Python
Alex Fedorov, 2021-10-08 13:40:33

Convert str to dict?

https://steamcommunity.com/id/alltimeoybek/invento...

there is a huge dictionary, using request I get all the text, only it is str, when I use eval, an error occurs.

How to translate such huge dictionary which is str to dict?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-10-08
@robben_55

If you use requests, you get data over HTTP. So there is not a Python dictionary, there is JSON. They are similar, but not the same!
Use the json module .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question