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 to get more than 30 metadata lines from a user's page? #21

Closed
JdbermeoUZH opened this issue Mar 14, 2023 · 8 comments
Closed

How to get more than 30 metadata lines from a user's page? #21

JdbermeoUZH opened this issue Mar 14, 2023 · 8 comments

Comments

@JdbermeoUZH
Copy link

Hi,

I was wondering if there is a way to get more than the last 30 items from a user's page? Is there a header or parameter in the get request in get_tiktok_json() that may be used so that it returns more than 30?

Thanks!

@JdbermeoUZH
Copy link
Author

I checked and other packages use the cursor parameter to paginate over the different posts and get more than 30 videos, however they used the previous API and no longer work. The current request one gets with get_tiktok_json() in pyktok does return the cursor and the hasMore parameter, but I tried specifying the cursor as a query in the get request but it did not work (I still got the same 30 results). Do you perhaps know maybe how the cursor should be specified in the get request?

@dfreelon
Copy link
Owner

Hi, not sure how this works, will try to have a look in the coming weeks.

@JoHn9988
Copy link

I checked and other packages use the cursor parameter to paginate over the different posts and get more than 30 videos, however they used the previous API and no longer work. The current request one gets with get_tiktok_json() in pyktok does return the cursor and the hasMore parameter, but I tried specifying the cursor as a query in the get request but it did not work (I still got the same 30 results). Do you perhaps know maybe how the cursor should be specified in the get request?

Hi, I'm also struggling with this function, I wonder if you have already fixed it by this way or found another solution? Thanks for sharing!

@dfreelon
Copy link
Owner

Sorry, haven't had the time to return to this--if anyone else has any working ideas, please add a PR.

@johndpope
Copy link

@johndpope
Copy link

is it out of scope or implemented?

@johndpope
Copy link

found this - https://github.com/Dinoosauro/tiktok-to-ytdlp/blob/main/script.js

eg.
https://www.tiktok.com/@jayjaysapphire
it works to navigate user to that page - and run script - will spit out a textfile -> like this
https://gist.github.com/johndpope/c15279a61b4a401c86c7292a51fb3691

@dfreelon
Copy link
Owner

dfreelon commented Jun 8, 2023

It's not out of scope, but my Javascript isn't strong enough to re-implement the approach demonstrated in your example in Python. If anyone wants to try, please be my guest...

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

No branches or pull requests

4 participants