R
R
RIKUDO052016-04-27 00:32:00
Python
RIKUDO05, 2016-04-27 00:32:00

How to make a bunch of VK API + Proxy?

Is there something that will help to work in VK API on Python 3.x and at the same time use proxies to send requests? I don't know much about this topic, so call me if I said something stupid.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xozzslip, 2016-04-27
@RIKUDO05

You need to use the requests library. You form the necessary http request yourself (see the api docks), make a post or get request using the generated url. To add a proxy, see the requests docks or google "requests proxy".
Spamming if you are going, by the way, will not work.

P
prawn-cake, 2016-05-27
@prawn-cake

Hello.
I recommend using the library https://github.com/prawn-cake/vk-requests
It supports all the necessary features
. As for the proxy, in order to make requests work with a proxy, it is enough to override the environment variables:
export HTTP_PROXY=" 10.10.1.10:3128 "
export HTTPS_PROXY=" 10.10.1.10:1080 "

V
Viktor Golovanenko, 2020-06-10
@drygdryg

To work with the VKontakte API, you can use the vk_api wrapper . You can make it work through a proxy like this:

import requests
import vk_api

s = requests.Session()
s.proxies.update({'http': 'http://10.11.4.254:3128'})

vk_session = vk_api.VkApi('+71234567890', 'mypassword', session=s)
vk_session.auth()

vk = vk_session.get_api()

print(vk.wall.post(message='Hello world!'))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question