usr bin python import sys import time import vk last 3535428 vk API 48

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/python
import sys
import time
import vk
last = 3535428
c = vk.API(4869613, '+79670305720', 'bsdisntrip2009', scope='groups')
l = []
ind = 0
l += c.groups.getMembers(group_id=12248747)['items']
l += c.groups.getMembers(group_id=12248747, offset=1000)['items']
l += c.groups.getMembers(group_id=12248747, offset=2000)['items']
l += c.groups.getMembers(group_id=12248747, offset=3000)['items']
l += c.groups.getMembers(group_id=12248747, offset=4000)['items']
def try_and_go(i):
try:
c.groups.invite(group_id=90919099, user_id=i)
print i, 'OK'
except Exception, err:
print err
if 'Captcha' in str(err):
time.sleep(10)
try_and_go(i)
for i in l:
if i < last:
print 'Already invited', i
ind += 1
else:
try_and_go(i)
ind += 1
time.sleep(1)
print 'Done:', ind
sys.exit(0)