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] - Url from video.as_dict returns a 404 link #1195

Open
Paul-Manart opened this issue Sep 19, 2024 · 0 comments
Open

[BUG] - Url from video.as_dict returns a 404 link #1195

Paul-Manart opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Paul-Manart
Copy link

Not too sure if it is the package or TikTok changes, but the url provided within video.as_dict no longer returns a video, but a 404 page.

async for video in api.hashtag(name=f"{topic}").videos(count=30, cursor=random.randint(0, 150)):
  video_dict = video.as_dict
  
  bitrate = video_dict['video']['bitrate']
  for i in video_dict['video']['bitrateInfo']:
      if bitrate == i["Bitrate"]:
          print(i["PlayAddr"]["UrlList"])
          response = requests.get(i["PlayAddr"]["UrlList"][-1])

Specifically, the last link of the UrlList is used to get the video.

@Paul-Manart Paul-Manart added the bug Something isn't working label Sep 19, 2024
@Paul-Manart Paul-Manart changed the title [BUG] - Url from video.as_dict returns a 404 link now. [BUG] - Url from video.as_dict returns a 404 link Sep 19, 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