G
G
Guerro692020-06-26 21:39:43
Python
Guerro69, 2020-06-26 21:39:43

How to get information from users.get request using only requests?

I need to access the users.get method without modules for VK, inserting my parameters there and getting the information that this method will return, I wrote a simple code:

import requests
data = {
  "act": "a_run_method",
  "al": 1,
  "hash": "1593195310:13590094328a17de0a",
  "method": "users.get",
  "param_fields": '',
  "param_name_case": Nom,
  "param_user_ids": 1,
  "param_v": 5.85
  }
s = requests.Session()
r = s.post('https://vk.com/dev', data=data)
print(r.text)

The request is successful, but getting the expected is not very easy, in the print I get:

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-06-26
@Guerro69

Are you sure that requests are created in this way?
There should be a request like this:

https://api.vk.com/method/users.get?user_id=210700286&v=5.52

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question