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

maximum number of attempts reached. try again later #1

Open
longnguyenQB opened this issue Mar 24, 2023 · 10 comments
Open

maximum number of attempts reached. try again later #1

longnguyenQB opened this issue Mar 24, 2023 · 10 comments

Comments

@longnguyenQB
Copy link

maximum number of attempts reached. try again later!
Looks like tiktok has detected selenium!

@zinkq
Copy link
Owner

zinkq commented Mar 24, 2023

As I have written in the youtube video comments - that code is not supposed to cope with all TikTok anti-bot security systems. It only allows you just to use selenium on the TikTok website - because as y'all could notice, the default selenium scripts with any additional libraries or options simply don't work, you can't even send keys or click any button using selenium. And that's what I was coping with for a really long time and I couldn't find any solution, so I did post it, though.

Anyways, the code works still for me. It seems like you guys are missin' something. The uc_chromedriver and selenium stealth are strictly needed there, there's no other way to not get that error. Also, the waiting sequences between sending keys to the element on the website are needed. TikTok detects that you have inputted all the data within less than a few seconds from launching the web driver - it just simply qualifies you as a bot.

Possible solutions to your problem;
a) other selenium stealth options that you should provide in your code
b) additional proxies (that's probably the reason why you are getting that error while sending too many requests in a short time)
c) longer, shorter or more random little breaks between sending keys to elements on the website.

@longnguyenQB
Copy link
Author

i tried using undetected_chrome and text input speed, timeout but still can't. Looks like selenium can't pass tiktok. If you have other methods, please share. Thank you very much!

@longnguyenQB
Copy link
Author

longnguyenQB commented Mar 26, 2023 via email

@zinkq
Copy link
Owner

zinkq commented Mar 26, 2023

Are you using the same code as me? There is no way that it is not working for you, if you are using both selenium-stealth and undetected-chromedriver, as you can see on all tests that are available on the internet - the selenium stealth solves all of your problems. For me, everything is still working fine, though.
So, if you are using your own code, then post it and we will see. Well, we can't use the same code with different result.

@longnguyenQB
Copy link
Author

longnguyenQB commented Mar 27, 2023 via email

@zinkq
Copy link
Owner

zinkq commented Mar 27, 2023

Firstly, install selenium-stealth

pip install selenium-stealth

Then implement this part of the code to your TikTokController.py file - it should fix your problem.

from selenium_stealth import stealth
import undetected_chromedriver as uc

driver = uc.Chrome(use_subprocess=True, headless=False)

stealth(driver,
        languages=["en-US", "en"],
        vendor="Google Inc.",
        platform="Win32",
        webgl_vendor="Intel Inc.",
        renderer="Intel Iris OpenGL Engine",
        fix_hairline=True,
        )

@longnguyenQB
Copy link
Author

longnguyenQB commented Mar 28, 2023 via email

@longnguyenQB
Copy link
Author

longnguyenQB commented Mar 28, 2023 via email

@zinkq
Copy link
Owner

zinkq commented Mar 28, 2023

So, I can't help you anymore. The only thing that I can suggest to you is to change your IP in some way, though. Maybe try using VPN or proxies. Good luck, my friend.

@Zehyper
Copy link

Zehyper commented Jun 22, 2024

Hey, Zinkq wondering how I can contact you regarding your TikTok bot, willing to pay for it!

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

3 participants