[BUG] - Code doesn't return anything.
See original GitHub issueI don’t get any output from any code, even the examples provided with the package and in the readme
import logging
from TikTokApi import TikTokApi
with TikTokApi(logging_level=logging.INFO) as api:
for trending_video in api.trending.videos(count=50):
print(trending_video.author.username)
I’ve tried reinstalling it, installing it from outside the venv, reinstalling playwright, passing the cookie to the API and nothing changed. Is anyone else having the same issue?
Issue Analytics
- State:
- Created a year ago
- Reactions:8
- Comments:19
Top Results From Across the Web
python - Why does my code not return anything - Stack Overflow
bisection only returns if f(c) == 0 but f() does not have a Return statement, so that will never happen. Past that, once...
Read more >Function '<procedurename>' doesn't return a value on all code ...
To correct this error. Check your control flow logic and make sure you assign a value before every statement that causes a return....
Read more >The output of functions that don't return anything should not be ...
If a function does not return anything, it makes no sense to use its output. Specifically, passing it to another function, or assigning...
Read more >Promise.prototype.then() - JavaScript - MDN Web Docs
It immediately returns an equivalent Promise object, allowing you to chain ... doesn't return anything: p gets fulfilled with undefined ...
Read more >Error handling, "try...catch" - The Modern JavaScript Tutorial
It won't work if the code is syntactically wrong, for instance it has unmatched ... Technically, we can use anything as an error...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was having this issue, but I noticed the url generated worked fine in my browser
So I exported the cookies from my browser (I’m logged into TikTok) into
cookies.json
and then was able to use the below to set those cookies in all requests through the apiThis is working for me
Here’s the step-by-step that worked for me, @Wathfea: