dfreelon / pyktok

A simple module to collect video, text, and metadata from Tiktok.
BSD 3-Clause "New" or "Revised" License
335 stars 44 forks source link

Downstream error #35

Closed NadezhdaOzornina closed 10 months ago

NadezhdaOzornina commented 10 months ago

Hello, I use the pyktok package since one week to download images and videos from TikTok, but today I got an error "The function encountered a downstream error and did not deliver any data, which happens periodically for various reasons. Please try again later". Consequently, the videos are not being downloaded. I am not sure what the reason for this error is and would like to know if I can solve it by myself or if it is the internal error on tiktok/pyktok. Could you please tell me, if there is any information on when the package will work properly again? I do the data collection from the linux server. Thanks! Nadja

Dedeham commented 10 months ago

Hi, I have the same issue. I am running it on windows.

dfreelon commented 10 months ago

Thanks for bringing this to my attention. Apparently TikTok has changed the way it stores its data within video pages. @BillyBSig fixed this in a Github commit awhile back, but I just uploaded those changes to PyPI so you should be able to update it with pip and the new version should work.

NadezhdaOzornina commented 10 months ago

Hello Dean,

I encountered the same error today while trying to download some new video files (yesterday everything worked perfectly). It seems that TikTok changes something in its data structure every week, that is why the packages are not working properly. Could it be possible to solve this problem?

Thanks, Nadja

dfreelon commented 10 months ago

I assume you updated to the latest version? If so, all I can do is try to keep up with the changes, but even then there's no guarantee everyone is seeing the same changes. I'll look into this soon.

dfreelon commented 10 months ago

OK, so to follow up on this, I tried earlier today and pyktok failed, but I just tried now (same code as before) and it successfully downloaded a video. So maybe it's a transient issue?

JBGruber commented 10 months ago

FYI: the format changed yesterday in Europe and I landed essentially on the same approach as @BillyBSig for my traktok package: retrieve and parse #__UNIVERSAL_DATA_FOR_REHYDRATION__ if #SIGI_STATE is not present (https://github.com/JBGruber/traktok/commit/ceaddc43125ca9a21a6dc622988e9116ed82fa0e). It works well.

dfreelon commented 10 months ago

Closing as it seems to be a transient issue.