You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
can't get video info through shared link (vm.tiktok.com)only with link copied directly through browser (tiktok.com)
To Reproduce
Steps to reproduce the behavior:
writing
with TikTokAPI() as api:
video = api.video("https://www.tiktok.com/@giaitrihaihuoc23/video/7248572478757391643?_r=1&_t=8eGXRQForn9")
does as you would expect and gets the video info however doing it through a link shared through the app like this:
with TikTokAPI() as api:
video = api.video("https://vm.tiktok.com/ZGJq2Yobp/")
throws these errors:
Traceback (most recent call last):
File "C:\Users\alber\PycharmProjects\TiktokToShorts\bot.py", line 22, in <module>
video = api.video(video_url)
File "C:\Users\alber\PycharmProjects\TiktokToShorts\venv\lib\site-packages\tiktokapipy\api.py", line 171, in video
return self._extract_video_from_response(response)
File "C:\Users\alber\PycharmProjects\TiktokToShorts\venv\lib\site-packages\tiktokapipy\api.py", line 297, in _extract_video_from_response
raise TikTokAPIError(
tiktokapipy.TikTokAPIError: Error in video extraction: status code 10201 (Unknown Error)
Process finished with exit code 1
Version Information
pydantic 2.0.4
playwright 1.36.0
tiktokapipy 0.2.1
System Information
win11, pycharm, latest python version
Region Information
Located in denmark
The text was updated successfully, but these errors were encountered:
Albert-Bruun-Thomsen
changed the title
[BUG] can
[BUG] can't get video info through shared link (vm.tiktok.com)only with link copied directly through browser (tiktok.com)
Jul 25, 2023
Seems to be a duplicate of #58. After looking closer, the issue is definitely on my end with a change I made in 0.2.0 to how video extraction works. I'll resolve this shortly.
* #58, #61 - Resolved status code 10201 appearing when extracting videos from mobile app share links
* #59 - Suppressed two errors during user video iteration:
* TypeError: `DeferredItemListIterator` no longer attempts to iterate over a None item_list
* JSONDecodeError: `DeferredItemListIterator` cuts iteration short if an API request returns null JSON
This error should (hopefully) be fixed in version 0.2.2. It seems that the issue was actually related to a change I made to video extraction in 0.2.0. It looks for the video ID in the video URL, which is possible with a desktop URL, but the mobile app share links are shortened and don't contain that information.
Describe the bug
can't get video info through shared link (vm.tiktok.com)only with link copied directly through browser (tiktok.com)
To Reproduce
Steps to reproduce the behavior:
writing
does as you would expect and gets the video info however doing it through a link shared through the app like this:
throws these errors:
Version Information
pydantic 2.0.4
playwright 1.36.0
tiktokapipy 0.2.1
System Information
win11, pycharm, latest python version
Region Information
Located in denmark
The text was updated successfully, but these errors were encountered: