wkaisertexas / tiktok-uploader

Automatically ⬆️ upload TikTok videos
https://pypi.org/project/tiktok-uploader/
360 stars 84 forks source link

Failed to add cookie #42

Closed Omaroid closed 11 months ago

Omaroid commented 1 year ago

Hello,

I exported the cookie informations and started with the basic example

from tiktok_uploader.upload import upload_video

cookies_list = [
    {
        'name': 'sessionid',
        'value': '<session_id>',
        'domain': '.tiktok.com',
        'path': '/',
        'expiry': "3/7/2024, 10:21:30 PM"
    }
]

if __name__ == "__main__":

    # upload video to TikTok
    upload_video("clip.mp4",
                 browser="firefox",
                 description="This is a video I just downloaded",
                 cookies_list=cookies_list)
[17:24:09] Authenticating browser with cookies_list
[17:24:09] Create a firefox browser instance 
[17:24:13] Authenticating browser with cookies
[17:24:15] Failed to add cookie {'name': 'sessionid', 'value': '<session_id>', 'domain': '.tiktok.com', 'path': '/', 'expiry': '3/7/2024, 10:21:30 PM'}
[17:24:15] Posting clip.mp4
               with description: This is a video I just downloaded
[17:24:15] Navigating to upload page

It failed adding the cookie, is there anyone having the same issues?

xingheyiyi commented 1 year ago

I'm the same way.

rafaellincoln commented 1 year ago

Just domains www.tiktok.com works

0xftm commented 11 months ago

don't use this session id, get cookie local txt

wkaisertexas commented 11 months ago

I think this is the equivalent to teachers telling you to write your name and people actually writing 'your name'.

Session ID is a specific token which your browser uses to prove it is logged into a particular website. You can get it through the developer tools in your browser, but using the get cookies method is preferable for most people.

All of your cookies get downloaded to a common file which has all of your browser's information.