[BUG] - TikTokApi.exceptions.CaptchaException when running example `search_example.py`
See original GitHub issueFill Out the template 😃
Describe the bug
when running example search_example.py
the following error is returned
TikTokApi.exceptions.CaptchaException: 0 -> TikTok blocks this request displaying a Captcha
Tip: Consider using a proxy or a custom_verify_fp as method parameters
The buggy code
import logging
TikTokApi(logging_level=logging.INFO) # SETS LOGGING_LEVEL TO INFO
# Hopefully the info level will help you debug or at least someone else on the issue
from TikTokApi import TikTokApi
with TikTokApi() as api:
for user in api.search.users("therock"):
print(user.username)
for sound in api.search.sounds("funny"):
print(sound.title)
for hashtag in api.search.hashtags("funny"):
print(hashtag.name)
Expected behavior
Example can successfully run
Error Trace (if any)
Put the error trace below if there’s any error thrown.
# Error Trace Here
Desktop (please complete the following information):
- OS: MacOS
- TikTokApi Version 5.x.x
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Unofficial TikTok API in Python - TikTokApi · PyPI
Unofficial TikTok API in Python. This is an unofficial api wrapper for TikTok.com in python. With this api you are able to call...
Read more >Captcha error with Python TikTokApi (from davidteather)
Here is the error I get running it: TikTokApi.exceptions.TikTokCaptchaError: TikTok blocks this request displaying a Captcha Tip: Consider ...
Read more >Captcha error with Python TikTokApi (from david...anycodings
Here is my minimalist TikTokApi Python code: #!/usr/bin/env python3.7 #-*-coding:utf-8-*- from TikTokApi import TikTokApi import datetime ...
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
same exact issue, actually none of the examples code work, each time it gives the same error:
I tried putting a custom_verify_fp or even using a proxy, same issue, absolutely nothing works…
I’ve been running into the same issue, and I think it is related specifically to when you are searching a user instance. For example, when you use the API to search the data for a specific video the captcha exception does not come up. However, trying to search for information specific to a user will raise the Captcha exception whether or not you’re using a proxy.