davidteather / TikTok-Api

The Unofficial TikTok API Wrapper In Python
https://davidteather.github.io/TikTok-Api
MIT License
4.69k stars 951 forks source link

[INSTALLATION] - TikTok blocks this request displaying a Captcha #397

Closed zzzzzwad closed 3 years ago

zzzzzwad commented 3 years ago

(text taken through translator) I'm not English speaking LAMER, who is facing similar programs for the first time. Did all the instructions, installed the bot and api. Write to the console code to start the bot, choose the settings for video and this is what it is

ERROR:root:Tiktok wants to display a catcha. Response is: {"code":"10000","from":"","type":"verify","version":"","region":"va","subtype":"slide","detail":"x9jkw6xrkPKThZUPvGdZwxNPTLKVME*JowlSkmBCjc-diO3gMmMAYGeTtP6qoxDlehmiN1sTKF*Kj7V-cLC0dx*hAQIFhjlZrXaD841jTQu6*X9tIJKSnElUUy6A7HfvGkOWMN7FkN3DUavwez*dUj0phWWrdooKBLX52DY8D-be5sOLQt2-jCNp4ooIxC1K6VHHSK1ktxhyZCugtrs9-1jlUo5pPH*qFTKC7-pXUP42JGSUDQW8vL*qvw8JBmOwsF-WggBOGWbMr8M4gVZk5zTh3AbJ6Qaqei-AWmjZ","verify_event":"","fp":"verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq","scene":""} ERROR:root:{'tt_webid': '799363772', 'tt_webid_v2': '799363772', 'tt_csrf_token': 'RjCCkcsQHDYXxqAq', 's_v_web_id': 'verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq'} Traceback (most recent call last): File "tiktokbot.py", line 118, in <module> results = api.trending(count=count, custom_did=did) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 302, in trending res = self.getData(url=api_url, **kwargs) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 179, in getData raise TikTokCaptchaError() TikTokApi.exceptions.TikTokCaptchaError: TikTok blocks this request displaying a Captcha Tip: Consider using a proxy or a custom_verifyFp as method parameters

what I need to do to get it working?

issue-label-bot[bot] commented 3 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.58. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

demon071 commented 3 years ago

if you want to use some simple api try Tiktok-API-Python

AlexVerrico commented 3 years ago

Posting in case it helps anyone else with the same issue: I couldn't manage to get it to work using Brave browser to get the cookie, for some reason I had to use Chrome to get the cookie and then it worked perfectly.

helmassaoudi commented 3 years ago

(text taken through translator) I'm not English speaking LAMER, who is facing similar programs for the first time. Did all the instructions, installed the bot and api. Write to the console code to start the bot, choose the settings for video and this is what it is

ERROR:root:Tiktok wants to display a catcha. Response is: {"code":"10000","from":"","type":"verify","version":"","region":"va","subtype":"slide","detail":"x9jkw6xrkPKThZUPvGdZwxNPTLKVME*JowlSkmBCjc-diO3gMmMAYGeTtP6qoxDlehmiN1sTKF*Kj7V-cLC0dx*hAQIFhjlZrXaD841jTQu6*X9tIJKSnElUUy6A7HfvGkOWMN7FkN3DUavwez*dUj0phWWrdooKBLX52DY8D-be5sOLQt2-jCNp4ooIxC1K6VHHSK1ktxhyZCugtrs9-1jlUo5pPH*qFTKC7-pXUP42JGSUDQW8vL*qvw8JBmOwsF-WggBOGWbMr8M4gVZk5zTh3AbJ6Qaqei-AWmjZ","verify_event":"","fp":"verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq","scene":""} ERROR:root:{'tt_webid': '799363772', 'tt_webid_v2': '799363772', 'tt_csrf_token': 'RjCCkcsQHDYXxqAq', 's_v_web_id': 'verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq'} Traceback (most recent call last): File "tiktokbot.py", line 118, in <module> results = api.trending(count=count, custom_did=did) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 302, in trending res = self.getData(url=api_url, **kwargs) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 179, in getData raise TikTokCaptchaError() TikTokApi.exceptions.TikTokCaptchaError: TikTok blocks this request displaying a Captcha Tip: Consider using a proxy or a custom_verifyFp as method parameters

what I need to do to get it working?

Did you manage to solve this problem ? if so , can you tell me please how ? i'm getting the same error :(

demon071 commented 3 years ago

(text taken through translator) I'm not English speaking LAMER, who is facing similar programs for the first time. Did all the instructions, installed the bot and api. Write to the console code to start the bot, choose the settings for video and this is what it is ERROR:root:Tiktok wants to display a catcha. Response is: {"code":"10000","from":"","type":"verify","version":"","region":"va","subtype":"slide","detail":"x9jkw6xrkPKThZUPvGdZwxNPTLKVME*JowlSkmBCjc-diO3gMmMAYGeTtP6qoxDlehmiN1sTKF*Kj7V-cLC0dx*hAQIFhjlZrXaD841jTQu6*X9tIJKSnElUUy6A7HfvGkOWMN7FkN3DUavwez*dUj0phWWrdooKBLX52DY8D-be5sOLQt2-jCNp4ooIxC1K6VHHSK1ktxhyZCugtrs9-1jlUo5pPH*qFTKC7-pXUP42JGSUDQW8vL*qvw8JBmOwsF-WggBOGWbMr8M4gVZk5zTh3AbJ6Qaqei-AWmjZ","verify_event":"","fp":"verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq","scene":""} ERROR:root:{'tt_webid': '799363772', 'tt_webid_v2': '799363772', 'tt_csrf_token': 'RjCCkcsQHDYXxqAq', 's_v_web_id': 'verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq'} Traceback (most recent call last): File "tiktokbot.py", line 118, in <module> results = api.trending(count=count, custom_did=did) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 302, in trending res = self.getData(url=api_url, **kwargs) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 179, in getData raise TikTokCaptchaError() TikTokApi.exceptions.TikTokCaptchaError: TikTok blocks this request displaying a Captcha Tip: Consider using a proxy or a custom_verifyFp as method parameters what I need to do to get it working?

Did you manage to solve this problem ? if so , can you tell me please how ? i'm getting the same error :(

You can try my api

nuqz commented 3 years ago

Hello, everyone.

@helmassaoudi @zzzzzwad I have a working solution for solving captchas (puzzle sliders). I will be able to share the tool (Python and PyTorch based) if someone tells me exact requests limits, i.e. I need a solution for this carcabot/tiktok-signature issue#105. I did some research, I already have where to start.

kami4ka commented 3 years ago

Hi, guys. I had luck with the following proxies: https://scrapingant.com/free-proxies/ (i own this resource, it's a scraped proxies, it's not just dumb self-promotion, I'm really using them with this API)

davidteather commented 3 years ago

i own this resource

Hey, that's pretty cool. I've seen your blog on getting TikTok data appear in the referring sites section on GitHub traffic.

kami4ka commented 3 years ago

@davidteather thanks :-) I've been impressed by all the work that has been done by you and contributors to maintain such project and I really appreciate it 💪

bmusuko commented 3 years ago

Hi, guys. I had luck with the following proxies: https://scrapingant.com/free-proxies/ (i own this resource, it's a scraped proxies, it's not just dumb self-promotion, I'm really using them with this API)

can you give example how to use scrapping ant proxy for TikTokApi?

tarkhil commented 3 years ago

(text taken through translator) I'm not English speaking LAMER, who is facing similar programs for the first time. Did all the instructions, installed the bot and api. Write to the console code to start the bot, choose the settings for video and this is what it is ERROR:root:Tiktok wants to display a catcha. Response is: {"code":"10000","from":"","type":"verify","version":"","region":"va","subtype":"slide","detail":"x9jkw6xrkPKThZUPvGdZwxNPTLKVME*JowlSkmBCjc-diO3gMmMAYGeTtP6qoxDlehmiN1sTKF*Kj7V-cLC0dx*hAQIFhjlZrXaD841jTQu6*X9tIJKSnElUUy6A7HfvGkOWMN7FkN3DUavwez*dUj0phWWrdooKBLX52DY8D-be5sOLQt2-jCNp4ooIxC1K6VHHSK1ktxhyZCugtrs9-1jlUo5pPH*qFTKC7-pXUP42JGSUDQW8vL*qvw8JBmOwsF-WggBOGWbMr8M4gVZk5zTh3AbJ6Qaqei-AWmjZ","verify_event":"","fp":"verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq","scene":""} ERROR:root:{'tt_webid': '799363772', 'tt_webid_v2': '799363772', 'tt_csrf_token': 'RjCCkcsQHDYXxqAq', 's_v_web_id': 'verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq'} Traceback (most recent call last): File "tiktokbot.py", line 118, in <module> results = api.trending(count=count, custom_did=did) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 302, in trending res = self.getData(url=api_url, **kwargs) File "C:\Users\papik\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 179, in getData raise TikTokCaptchaError() TikTokApi.exceptions.TikTokCaptchaError: TikTok blocks this request displaying a Captcha Tip: Consider using a proxy or a custom_verifyFp as method parameters what I need to do to get it working?

Did you manage to solve this problem ? if so , can you tell me please how ? i'm getting the same error :(

You can try my api

Doesn't seems to work, sorry.

kami4ka commented 3 years ago

Hi, guys. I had luck with the following proxies: https://scrapingant.com/free-proxies/ (i own this resource, it's a scraped proxies, it's not just dumb self-promotion, I'm really using them with this API)

can you give example how to use scrapping ant proxy for TikTokApi?

Sure. Just grab one of the IPs from the https://scrapingant.com/free-proxies/ and pass it inside the init function of the API:

api = TikTokApi.get_instance(proxy="<proxy_ip>:<proxy_port>")

For example: api = TikTokApi.get_instance(proxy="213.137.240.243:81")

bmusuko commented 3 years ago

Hi, guys. I had luck with the following proxies: https://scrapingant.com/free-proxies/ (i own this resource, it's a scraped proxies, it's not just dumb self-promotion, I'm really using them with this API)

can you give example how to use scrapping ant proxy for TikTokApi?

Sure. Just grab one of the IPs from the https://scrapingant.com/free-proxies/ and pass it inside the init function of the API:

api = TikTokApi.get_instance(proxy="<proxy_ip>:<proxy_port>")

For example: api = TikTokApi.get_instance(proxy="213.137.240.243:81")

Thank you, I just created a scraper to get a list of proxy listed in scrapingant.com https://github.com/bmusuko/free-proxy-scrapper

davidteather commented 3 years ago

There's also a YouTube video in the readme that explains how to get a custom_verifyFp and another workaround

pbies commented 1 year ago

There's also a YouTube video in the readme that explains how to get a custom_verifyFp and another workaround

Seems like that needed cookie is no longer available.