TikTop-Bot
This is a bot for automatically completing tasks on the TikTop-free
Quick Start
-
Add in file
config.py
your chrome version (None
= Latest Stable) -
You need to add the email and password from the TikTop-free account in the file
config.py
- To authorize with cookies, you need
- Run file
create_cookie.py
- Write
1
in console - Press enter and login manually in the browser that appears
- Then write email which you used to login in console
- The email must be written as in file
config.py
- ! Cookie authorization will activate if normal authorization fails
- ! If normal authorization is success then cookies is saved
- Run file
- To authorize with cookies, you need
-
You must add the usernames(without '@') and passwords of the TikTok accounts that will be used for farming in file
config.py
- To authorize with cookies, you need
- Run file
create_cookie.py
- Write
2
in console - Press enter and login manually in the browser that appears
- Then write username(without '@') which you used to login in console
- The cookie name must be a username written as in file
tiktok_accounts.py
- ! Cookie authorization will activate if normal authorization fails
- ! If normal authorization is success then cookies is saved
- Run file
- To authorize with cookies, you need
-
Install requirements
-
Run main.py
Short documentation
src/api/tiktok.api
- class TikTokApi:
__init__(driver)
- Accepts the selenium driver objectis_logged_in()
- Checks if the user is logged in, returns boolean valuelogin_with_username()
- Allows to log into account, accepts arguments username and password from tiktok accountlogin_with_cookies()
- Allows to log into account with cookies, accepts filename of cookiesave_cookies()
- Allows to save cookies, accepts filename for cookieis_video_liked()
- Checks if the video is liked, accepts url of this videolike_the_video()
- Allows to like the video (needed to be logged), accepts url of this video, if already liked - skipsis_user_following()
- Checks if the user is followed, returns boolean valuefollow_user()
- Allows to subscribe to a user (needed to be logged), accepts url of this video, if already subscribed - skips
src/api/tiktop.api
- class TikTopApi:
__init__(driver, login, password)
- Accepts the selenium driver object and task typewait_progressbar_loading()
- Looks for Progress Bar in html, if present, waits until it disapear. This is necessary for the site to load to the end.get_toast_message()
- Returns notification message. It appears at the top right when logging in, completing tasks, adding accounts, etc.is_logged_in()
- Checks if the user is logged in, returns boolean valuelogin_with_email()
- Allows to log into account, accepts arguments email and password from TikTop-free accountlogin_with_cookies()
- Allows to log into account with cookies, accepts filename of cookiesave_cookies()
- Allows to save cookies, accepts filename for cookiechange_tiktok_account()
- Selects TikTok account on the TikTop-free. Accepts username(without '@') of TikTok account to be selectedget_task_url()
- Returns current task url to be completed (depends of the value of the task_type. Ex.: if task_type = 'like' then it returns video to be liked)check_task()
- Clicks on the check task button and return toast messageclose_task()
- Clicking on the close task button (skip task)