davidteather / TikTok-Api

The Unofficial TikTok API Wrapper In Python
https://davidteather.github.io/TikTok-Api
MIT License
4.87k stars 977 forks source link

[BUG] - Discover Methods Broken #586

Closed davidteather closed 3 years ago

davidteather commented 3 years ago

Currently all of the discover methods are broken. It's getting hit consistently with captchas one of my theories about this is that the mobile web app version of TikTok doesn't display trending, but the package feigns a mobile user agent. If someone could investigate this further or make a PR that fixes this that would be helpful

Methods affected

MuffinFox commented 3 years ago

Seems this also occurs now with by_sound (and maybe other methods), i had a quick look, and there was some new csrf header added recently. See https://github.com/MuffinFox/TikTok-Api/commit/2e23179d8281e98a5ba4876ed41af78099ec31c5 for a quick fix.

davidteather commented 3 years ago

Thanks for the fix! Also seems like the use_test_endpoints isn't working on the more discoverability endpoints now. Anyways, released a new version that should help this so I'll close the issue. Also credited @MuffinFox as co-author :)

MuffinFox commented 3 years ago

I accidentially used a incorrect length for token, pls also merge https://github.com/MuffinFox/TikTok-Api/commit/10f05b91be8a12c80f38def89f3954d433b223e8