TikTok-Api icon indicating copy to clipboard operation
TikTok-Api copied to clipboard

[BUG] - TikTok returning status_code 0 from trending.videos

Open Jordan-M opened this issue 2 years ago • 3 comments

Describe the bug

api.trending.videos is not returning any results. Stepping into the TikTok-Api code reveals that TikTok is responding with status_code 0 with no other objects in the response: image

Going to the url crafted in Trending.py returns the same status_code 0 response: image

The buggy code

from TikTokApi import TikTokApi

with TikTokApi() as api:
    for trending_video in api.trending.videos(count=50):
        print(trending_video.author.username)

Expected behavior

Videos would be returned from the call

Desktop (please complete the following information):

  • OS: Windows 10
  • TikTokApi Version 5.1.1

Jordan-M avatar May 05 '22 07:05 Jordan-M

Seeing the same issue on Mac as well.

jacksonw765 avatar May 07 '22 13:05 jacksonw765

I have the same problem

Denon avatar Jul 11 '22 17:07 Denon

same problem here

Hiroyuki1995 avatar Aug 11 '22 03:08 Hiroyuki1995

Same here, interesting enough, copying the URL that requests.get is using and just pasting it into the browser returns a valid payload with tiktok data. Not sure how the request is messing it up :/

alete89 avatar Mar 09 '23 20:03 alete89

Should be fixed in V6

davidteather avatar Aug 08 '23 22:08 davidteather