Advertisement
stuppid_bot

Untitled

Jun 15th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.01 KB | None | 0 0
  1. # -*- coding: utf8 -*
  2. from vkclient import VKClient, VKClientError
  3. from captcha import process_captcha
  4.  
  5. class VKApp(VKClient):
  6.     def __init__(self, *args, **kwargs):
  7.         super(VKApp, self).__init__(*args, **kwargs)
  8.         self.process_captcha = process_captcha
  9.         # если приложение установлено у более чем 1 миллиона человек, то можно отправлять не более 35 запросов в секунду
  10.         self.delay_time = 1.0 / 35
  11.  
  12.     def login(self, username, password):
  13.         self.auth({
  14.                        'username': username,
  15.                        'password': password,
  16.                        'client_id': 2274003,
  17.                        'client_secret': 'hHbZxrka2uZ6jB1inYsH',
  18.                        'scope': 'notify,friends,photos,audio,video,docs,notes,wall,groups,messages,notifications,activity,status,pages,stats',
  19.                        'grant_type': 'password'
  20.                   },
  21.                   'token')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement