wkaisertexas / tiktok-uploader

Automatically ⬆️ upload TikTok videos
https://pypi.org/project/tiktok-uploader/
MIT License
390 stars 91 forks source link

Multiple Account - Cookies #133

Closed shandyisme closed 5 months ago

shandyisme commented 6 months ago

Hi @wkaisertexas , this is really nice code, I've been using this for last few months.

I'm doing multiple accounts, creating 1 folder for each accounts (upload.py, cookies.txt, mp4 video), everytime I want to switch account (running from different folder), I need to re-download the cookies from get locally to use it in order to make it work, otherwise the tiktok won't login automatically using cookies.

Is there a way to use the cookies file back and forth?

Thank you

wkaisertexas commented 6 months ago

You need one cookies.txt file per account. Your cookies file (among other things) contains a session token that identifies you as being logged in (effectively, this library is one big session token spoofing attack).

However, if you log out of one account and log back into another, logging out will invalidate the session tokens from your previous account.

I solved this in two ways:

If you have any more questions, let me know!

shandyisme commented 6 months ago

Instead of signing out of accounts, clear your cookies. This will allow you to sign into a new account without signaling to TikTok that you logged out of your old one.

This is really simple good solution. Problem solved. Now I can easily manage multiple account.

Thank you!