In the get_comments() function's call to api.create_sessions(), I changed 'headless' to 'headless=headless'. This solved an error when using the save_tiktok_comments(): TypeError: TikTokApi.create_sessions() got multiple values for argument 'num_sessions' which then causes:
AttributeError: 'TikTokApi' object has no attribute 'browser'.
By specifying 'headless=headless', it allows TikTokApi object to fall back on the default 'num_sessions' value instead of trying to use the 'headless' value.
In the get_comments() function's call to api.create_sessions(), I changed 'headless' to 'headless=headless'. This solved an error when using the save_tiktok_comments(): TypeError: TikTokApi.create_sessions() got multiple values for argument 'num_sessions' which then causes: AttributeError: 'TikTokApi' object has no attribute 'browser'.
By specifying 'headless=headless', it allows TikTokApi object to fall back on the default 'num_sessions' value instead of trying to use the 'headless' value.