forked from tolgatasci/musically-tiktok-api-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.py
32 lines (27 loc) · 848 Bytes
/
demo.py
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
from api import Api
from time import sleep
import sys
import os
def login_(login):
if (login.get('code')):
from capthca import capthca
cc = capthca(login.get('code'))
if (cc.backdata):
if (len(cc.backdata) > 0):
login = Api.login(username, password, cc.backdata)
del cc
login_(login)
else:
print('empty form again')
login = Api.login(username, password, cc.backdata)
del cc
login_(login)
if __name__ == "__main__":
api = Api()
api.global_variable['device_id'] = "6648944787888948741"
api.global_variable['iid'] = "6648944787888948741"
api.global_variable['openudid'] = "6vchx2vx3ubd051q"
username = ""
password = ""
login = api.login(username,password)
login_(login)