Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get all videos posted by a specific user? #686

Closed
pyon-yx opened this issue Sep 3, 2021 · 4 comments
Closed

How can I get all videos posted by a specific user? #686

pyon-yx opened this issue Sep 3, 2021 · 4 comments

Comments

@pyon-yx
Copy link

pyon-yx commented Sep 3, 2021

I tried to use user_posts(). Since this function supports count and cursor, I thought that I could use cursor for the pagination.
But whatever I set for cursor, I can get the same result (list of videos).
I want it should work in this way.
If a user posted 1000 videos, when I set count=30 and cursor=0, it will return the first 30 videos(from the 1st to the 30th).
When I set count=30 and cursor=1, then it will return the second 30 videos(from the 31st to the 60th),
But it does not work in this way.
Would you like to tell me how I can get the all videos posted by a specific user?
(According to the comment, I can get up to 2000 videos. What if over 2000 videos?)

@djmarioka
Copy link

I'd like to know how to get all the Tik Tok user's videos, also.

Could you help us, David?.

Thanks for your great work.

@PhanNN
Copy link

PhanNN commented Sep 17, 2021

@pyon-yx the cursor has the meaning as start position
if you want to get the next page, you should pass the "cursor" from the prev response and create a new request

image
For example: the first request, I pass cursor = 0, get 30 items, response will contain hasMore = true (has more data) and the next cursor (cursor = 31)
So for the second request, I will pass cursor = 31 and get next 30 items, ...

I hope this will help you

@pyon-yx
Copy link
Author

pyon-yx commented Sep 17, 2021

@PhanNN I made it working. Thanks for your reply.

@magicub
Copy link

magicub commented Sep 23, 2021

it used to be easier, actually there was an article about it https://towardsdatascience.com/how-to-collect-data-from-tiktok-tutorial-ab848b40d191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants