TikTok-Api: [BUG] - KeyError: 'hasMore'

trying to download a video using code

https://github.com/davidteather/TikTok-Api/issues/311#issuecomment-721164493

just want to download video (get bytes)

File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\TikTokApi\tiktok.py", line 406, in userPosts
    if not res["hasMore"] and not first:
KeyError: 'hasMore'
  • OS: Windows 10
  • TikTokApi Version 3.7.9

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (4 by maintainers)

Most upvoted comments

Try to use a custom_verifyFp This error appears when response from Tiktok is blocked: json returned by tiktok is not the expected response but a kind of json error message.

I take that all back. Now getUser is seemingly working fine.

Now I’m getting a requests.exceptions.SSLError: HTTPSConnectionPool(host='tiktok.com', port=443): Max retries exceeded with url: /@imgalina?lang=en (Caused by SSLError(SSLCertVerificationError("hostname 'tiktok.com' doesn't match either of '*.snssdk.com', 'snssdk.com'")))for byUsername.

Feeding the s_v_web_id to custom_verifyFp will then give “Invalid Response” instead.

did it work on you ?

it seems to have gotten better. I also added some data to the cookies taken from the site Screenshot_2