samirelanduk / tiktok-save

A Python tool for backing up your liked and bookmarked videos on tiktok to your computer.
90 stars 13 forks source link

Playwright Error #11

Closed zynk closed 1 year ago

zynk commented 1 year ago

Followed instructions on Readme, getting an error when using save.py

File "C:\Users\Eden\tiktok-save\save.py", line 49, in tiktok_dict = api.get_tiktok_by_id(tiktok_id, custom_did=did) File "C:\Python310\lib\site-packages\TikTokApi\tiktok.py", line 1077, in get_tiktok_by_id return self.get_data(url=api_url, kwargs) File "C:\Python310\lib\site-packages\TikTokApi\tiktok.py", line 229, in get_data verify_fp, did, signature = self.browser.sign_url(kwargs) File "C:\Python310\lib\site-packages\TikTokApi\browser.py", line 188, in sign_url evaluatedPage = page.evaluate( File "C:\Python310\lib\site-packages\playwright\sync_api_generated.py", line 8694, in evaluate self._sync( File "C:\Python310\lib\site-packages\playwright_impl_sync_base.py", line 109, in _sync return task.result() File "C:\Python310\lib\site-packages\playwright_impl_page.py", line 395, in evaluate return await self._main_frame.evaluate(expression, arg) File "C:\Python310\lib\site-packages\playwright_impl_frame.py", line 277, in evaluate await self._channel.send( File "C:\Python310\lib\site-packages\playwright_impl_connection.py", line 61, in send return await self._connection.wrap_api_call( File "C:\Python310\lib\site-packages\playwright_impl_connection.py", line 482, in wrap_api_call return await cb() File "C:\Python310\lib\site-packages\playwright_impl_connection.py", line 97, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: TypeError: undefined is not an object (evaluating 'S[A][m(a[oprand[1]],oprand[1])]')

samirelanduk commented 1 year ago

I haven't been able to replicate this unfortunately - is it still an issue?

zynk commented 1 year ago

Issue was never resolved, went with a different approach. Believe it's related to TikTokApi, so not directly tied to this project.

sfal commented 1 year ago

@zynk I have the same issue, haven't been able to make this work. What was the different approach?

zynk commented 1 year ago

@sfal Hey Sfal, my use-case was very specific, I only wanted to download all my liked videos in hi res w/o watermark, the only successful method I found was using yt-dlp: https://github.com/Dinoosauro/tiktok-to-ytdlp

You execute a javascript on your profile likes page which compiles a list of urls, then using ytdlp you mass download them all. Worked like a charm.

sfal commented 1 year ago

That's great, it worked perfectly. Thanks for sharing!