Russell-Newton / TikTokPy

Extract data from TikTok without needing any login information or API keys.
https://pypi.org/project/tiktokapipy/
MIT License
208 stars 27 forks source link

[BUG] Challenges not working #88

Open RommelTJ opened 3 months ago

RommelTJ commented 3 months ago

Describe the bug Make a request to get "fyp" challenges. Get 0 videos back.

To Reproduce

  1. Make a request like so:
    with TikTokAPI() as api:
        challenge = api.challenge("fyp")
        print(challenge)

Expected behavior I expect a response with videos, since the "fyp" challenge or hashtag most definitely has videos: https://www.tiktok.com/tag/fyp

Actual response:

title='fyp' id=229207 desc='' is_commerce=False stats=ChallengeStats(video_count=0, view_count=67764100000000)

Version Information

idna==3.7
playwright==1.45.1
pydantic==2.8.2
pydantic_core==2.20.1
pyee==11.1.0
requests==2.32.3
tiktokapipy==0.2.4.post2
typing_extensions==4.12.2
urllib3==2.2.2

System Information Apple M2 Max Sonoma 14.5

Region Information I am in the US.

Additional context I'm looking for an API that can retrieve me trending videos for a given topic. It appears not even TikTok offers this functionality via their API, so I'm left to scrape. Ideally, I want the same output as this endpoint: https://www.tiktok.com/api/search/general/full/

Also, it's unclear to me if this library is abandoned. Requests to other methods, like api.video, worked as intended.