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

I think there is still an issue with getting more than 68 videos #3

Closed
filipdraganic opened this issue Aug 29, 2019 · 13 comments
Closed
Labels
bug Something isn't working

Comments

@filipdraganic
Copy link

I think the issue is still present because when I invoke trending(100) let's say, the len() function of the data it returns never exceeds more than 65-68 videos. Also in line 32, in the if statement the two urls are the same, but one has a space so the signature was never returned. I got it working by setting one of the two links to m.tiktok.com/.... .

Maybe I didn't use the function properly or something?

@davidteather
Copy link
Owner

Yeah, I see the extra space on line 32.
In theory, it shouldn't matter and I was getting valid signatures last time I tried it out.
I'll take a look at it either today or tomorrow though.

@davidteather davidteather added the bug Something isn't working label Aug 29, 2019
@davidteather
Copy link
Owner

Could you provide your example code that you are running?

@filipdraganic
Copy link
Author

tiktok.zip

This is your code, just with the space removed and www.tiktok.com substituted with m.tiktok.com

@davidteather
Copy link
Owner

Can you also provide an example of the code where you called the API from?

@filipdraganic
Copy link
Author

tiktok = TikTokapi()

data = tiktok.trending(200)

print(len(data))

@davidteather
Copy link
Owner

So I looked at it and at least for me the signature thing was working.
The weird thing is that I am able to get 141 results when I select to do 200.
The limit may be the website trending page I'll use wireshark tomorrow and see where the apps database calls are going to.

@filipdraganic
Copy link
Author

Okay, im very interested to see what is the issue

@davidteather
Copy link
Owner

So you doing the change that first link with a space to m.tiktok.com just solved the signature issue not the limit thing right?

Making unofficial APIs really sucks sometimes. I didn’t have much time today to debug to figure out what was causing the issue or anything. The only thing I can think of is that the trending tiktok website limits to presumably 141 videos.

Tomorrow I should have more free time to figure out what’s wrong with it.

@filipdraganic
Copy link
Author

So you doing the change that first link with a space to m.tiktok.com just solved the signature issue not the limit thing right?

Yes, now the code always gets the signature, and before it was a 1 in 10 chance. Maybe its just a issue with my region or something and not necessarily a problem with the code.

Tomorrow I should have more free time to figure out what’s wrong with it.

I totally get that, im just interested in this and im glad someone else is. Hope to hear from you soon!

@filipdraganic
Copy link
Author

Hey, David,
Did you find anything that would help solve the problem?

@davidteather
Copy link
Owner

I haven’t been able to yet. Sorry.

davidteather added a commit that referenced this issue Sep 5, 2019
Added a fix by the user who created #3
@davidteather
Copy link
Owner

It seems like I've been able to resolve the issue. I'm not sure why or how, but it looks like it's able to retrieve more than 200 for me at least. I should have a new PyPi update for V2.1.8 in at most 2 hours.

Thanks for using api!

@fratamico
Copy link

Hi David,

I'm using the userPosts method to get videos by a given creator, but it seems to only be returning 100 videos? Do you know if there is a way to get around that limit?

vdemay pushed a commit to vdemay/TikTok-Api that referenced this issue Nov 30, 2020
bruce691 pushed a commit to bruce691/TikTok-Api that referenced this issue May 20, 2023
Added a fix by the user who created davidteather/TikTok-Api#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants