S
S
sharkyyy32020-05-20 03:30:52
Python
sharkyyy3, 2020-05-20 03:30:52

How to get full response from server without using vk_api?

I send a request, but I just can't get all the fields specified in "fields", only the last field specified in the tuple comes.

array = {'group_id': 98446009, "sort": "id_desc", "offset":i,"fields" : ('online', "sex"), 
             'access_token': good_token, 'v': '5.103'}
members1 = requests.post('https://api.vk.com/method/groups.getMembers', data=array,
                                     headers=headers).json()

If you send via vk_api, all fields come, and if via post, then in this case only "sex" comes

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Guerro69, 2020-05-20
@Guerro69

array = {'group_id': 98446009, "sort": "id_desc", "offset":i,"fields": "online, sex", 
             'access_token': good_token, 'v': '5.103'}

The fields parameters must be listed in the same brackets

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question