File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44
55def main ():
6- """ Пример получения access_token из сode после OAuth авторизации на сайте """
6+ """ Пример получения access_token из сode после OAuth авторизации на сайте
7+ """
78
89 code = '18dczc1337a63427fa'
910 redirect_url = 'http://example.com'
Original file line number Diff line number Diff line change 88
99from __future__ import print_function
1010
11+ import random
12+
1113import six
12- import time
1314
1415try :
1516 import simplejson as json
@@ -37,7 +38,8 @@ def clear_string(s):
3738
3839
3940def get_random_id ():
40- return int (time .time () * 10000000 )
41+ """ Get random int32 number (signed) """
42+ return random .getrandbits (31 ) * random .choice ([- 1 , 1 ])
4143
4244
4345def code_from_number (prefix , postfix , number ):
Original file line number Diff line number Diff line change 1313import time
1414
1515import requests
16+ import six
1617
1718import jconfig
1819from .enums import VkUserPermissions
You can’t perform that action at this time.
0 commit comments