Hacker Newsnew | past | comments | ask | show | jobs | submit | more seleniumbase's commentslogin

That patches chromedriver, (which gets renamed to uc_driver), but patching by itself isn't enough to bypass bot-detection. SeleniumBase also sets specific Chrome options and modifies methods to use the Chrome Devtools Protocol.


I was more astonished that you could just search and replace a string in a PE/ELF binary without breaking everything, but I take your solution over recompiling chrome anytime. Awesome job, very well done!


Thank you!


With SeleniumBase, you can bypass CAPTCHAs with one line of code: `sb.uc_gui_click_captcha()`


okay but it doesnt solve all captchas but a solving service does with a few more lines of code.

Can your script even do Google CAPTCHA and HCaptcha? What about the captcha from Dread? (aint no way it can)

There is no need to bypass them when you can just solve them.


There's a reCAPTCHA on the Pokemon website. This SeleniumBase example bypassed it: https://github.com/seleniumbase/SeleniumBase/blob/master/exa...


> There is no need to bypass them when you can just solve them.

There is no need to solve them when you can just bypass them.


the point is you cant bypass them all but you CAN solve them all.


Why pay to solve CAPTCHAs when SeleniumBase can bypass them for free? SeleniumBase can also "solve" CAPTCHAs (such as Cloudflare via click).


It's like you're not even reading what he wrote.


That method came from code that I accepted in a PR from December 31, 2019: https://github.com/seleniumbase/SeleniumBase/pull/459 Not a true representation of most of the code today.


It's not really bad thought.

It's clear, it's intuitive, it's easy to understand on first glance, it's a single purpose function, it's easy to step through.

you don't have anything to defend here.


The code is in the code base. Presumably, it still gets run. It doesn't make a difference if new code doesn't look like that.


Bad old code has been battle tested. Bad new code has not, and is more likely to have the show stopper bugs you want to avoid.


There's actually a lot of examples being used for testing (https://github.com/seleniumbase/SeleniumBase/tree/master/exa...), which are run regularly (locally and in GitHub Actions). Plus, a lot of major companies are using SeleniumBase: https://github.com/seleniumbase/SeleniumBase/blob/master/hel... (if something breaks, I find out quickly)


Call it "legacy code" if you'd like. That specific part is from a less common feature for setting options when running on a Selenium Grid. The new CDP Mode isn't compatible with The Grid (since CDP Mode makes direct CDP API calls without making Selenium API calls).


it's always easier for people today to look at the work of other people in the past and draw stupid conclusions.. don't mind them..


SeleniumBase modifies the webdriver so that it doesn't get detected when used alongside the CDP stealth mode and methods. It'll download chromedriver for you. Not sure what you mean by the multiple branches, as there's just the primary one. What 1000-line methods are you referring to? By "flags", do you mean the different command-line options available? As for Playwright, they aren't undetected: See https://github.com/microsoft/playwright/issues/23884#issueco... - "Playwright is an end-to-end testing framework, where we expect you test on your own environments. Bypassing any form of bot protection is not something we can act on. Thanks for your understanding." On the contrary, SeleniumBase is OK with bypassing bot detection: https://github.com/seleniumbase/SeleniumBase/blob/master/exa...


Not the commenter, but “multiple branches” in this context is referring to if/else statements in the code, not source-control branches. Similarly, “flags” is referring to function arguments like a boolean “is_original.” More generally, they are just saying that the code has long, complicated, bug-prone functions.

That said, I just spent a few minutes browsing the SeleniumBase repro, and honestly it didn’t seem that unusual to me. Would be interested in seeing a specific example of what the commenter had in mind.




SeleniumBase gives you more consistent results than just using WebDriver alone, as SeleniumBase wraps WebDriver methods to improve the reliability of browser actions.


SeleniumBase has those retries built-in. The browser will automatically wait for page elements to fully load before interacting with them. In addition, SeleniumBase includes all the abilities of pytest, which transforms Selenium from a library into a complete test automation framework.


That makes setup super easy! :)


I built a Docker integration for SeleniumBase. You can find all the info in the Docker ReadMe: https://github.com/seleniumbase/SeleniumBase/blob/master/int...


On the topic of convenience and flexibilty, I've made it easier to use the Selenium Grid Hub: https://github.com/seleniumbase/SeleniumBase/tree/master/int...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: