posts = list() result = client.tiktok_user_posts_from_username( username="zachking", depth=1, ) posts.extend(result.data["data"]) next_cursor = result.get("nextCursor") if next_cursor is not None: result = client.tiktok_user_posts_from_username( username="zachking", depth=5, cursor=next_cursor, ) posts.extend(result.data["data"]) print("Posts:", len(posts))
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter