omkarcloud / botasaurus

The All in One Framework to build Awesome Scrapers.
https://www.omkar.cloud/botasaurus/
MIT License
1.16k stars 104 forks source link

Wrapper and Decorator Help #37

Closed KFKMan closed 4 months ago

KFKMan commented 5 months ago

Can you add c# wrapper? And can we use this library without decorating function? if yes can you give me a example

i'm looked at codes and a lot of antibot code is based on english like "Please verify you are a human", can you add localization support for that?

Enums, Consts can be on the other folder

    def short_random_sleep(self):
        sleep_for_n_seconds(uniform(2, 4))

    def long_random_sleep(self):
        sleep_for_n_seconds(uniform(6, 9))

    def sleep_forever(self):
        sleep_forever()
#anti_detect_driver.py #85 - 92 i'm think it's must be in the utils.py with the reference to enum in the wait.py

accept_cookies_btn = driver.get_element_or_none_by_selector("button#L2AGLb", None)
# accept_google_cookies.py #27 i'm think button#L2AGLb code and others can be changed/randomized with google because of that i'm think you can create json parser for your library with json parser users can be create his selector/captcha solver/clicker without forking the repository.

    def google_get(self, link,  wait=None, accept_cookies=False):
        self.get("https://www.google.com/")
        if accept_cookies:
            accept_google_cookies(self)
        return self.get_by_current_page_referrer(link, wait)

    def get_google(self, accept_cookies=False):
        self.get("https://www.google.com/")
        if accept_cookies:
            accept_google_cookies(self)
        # self.get_element_or_none_by_selector('input[role="combobox"]', Wait.VERY_LONG)
#anti_detect_driver.py #342 - 352 there is a lot of google urls firstly you can add enum/consts class for that "https://www.google.com/" and secondly you can add support for customising url (supporting user to select google url)

#You can add support for searching on google (with keyword) and listing data, if you want to add i think it's most be enumerable because user can be don't want to click/go/navigate to the pages in the first list (or second list etc)...

#And looks like there is a speeling error on accept_google_cookies.py #25
                    raise Exception("Unabe to load Google")

And selenium automatically adds navigator.webdriver variable with true value you need to change this variable to false And you need add --disable-blink-features=AutomationControlled (i don't looked all code, maybe it has already been added)

i don't used new versions of selenium maybe it's changed

Chetan11-dev commented 4 months ago

Hello Kaan,

Thank you for your suggestion. At this point of time, I'm not planning to add the proposed feature's.

However, should more users express interest in this feature, I will surely reconsider my decision.

Also, If the current software satisfies your needs without the additional feature's, it's better to use something that works.

Thank you for your understanding.

Best, Chetan