Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - api.sound.info() does not work #1168

Open
Hprogram opened this issue Jul 4, 2024 · 0 comments
Open

[BUG] - api.sound.info() does not work #1168

Hprogram opened this issue Jul 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Hprogram
Copy link

Hprogram commented Jul 4, 2024

Describe the bug

Setting sessions' headless to True when running api.sound.info() does not work.

Setting headless to False to make it visible to the browser works well

The buggy code

async with TikTokApi() as api:
                try:
                    await api.create_sessions(
                        ms_tokens=[ms_token],
                        num_sessions=1,
                        sleep_after=3,
                        headless=True,
                    )

                    sound_info = await api.sound(id=tiktok_code).info()

                    return sound_info["musicInfo"]["stats"]["videoCount"]
                except Exception as e:
                    print(f"Error fetching TikTok data: {e}")
                    return 0

Preferably the smallest amount of code to reproduce the issue.

SET LOGGING LEVEL TO INFO BEFORE POSTING CODE OUTPUT

Error fetching TikTok data: None -> TikTok returned an empty response

Desktop (please complete the following information):

  • OS: MacOS 14.5
  • TikTokApi Version [e.g. 6.3.0]
@Hprogram Hprogram added the bug Something isn't working label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant