wkaisertexas / tiktok-uploader

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

add netscape\json cookies format #111

Closed zerofishy closed 7 months ago

zerofishy commented 7 months ago

can you add netscape\json format for video upload?from .txt

wkaisertexas commented 7 months ago

The .txt file created by get_cookies.txt is in the Netscape cookie format.

Alternatively, you are allowed to pass a dictionary of cookies. (see README)

To parse your JSON into a dictionary, you can use the following snippet:

from json import load

with open("my_file.json") as f:
   cookies_dict = json.load(f)