py-bas-automation: Supercharge BAS with Python

Share BAS modules
  • 🚀 py-bas-automation: Supercharge BAS with Python! 🚀

    Born from a desire to harness the power of BrowserAutomationStudio's browser capabilities while leveraging the
    familiarity of Python, py-bas-automation stands out.

    It's more than just a tool — it's the fusion of the best of both worlds, culminating in a robust solution for web
    automation aficionados.

    💡 Why I Created It:

    • I needed only the browser component from BAS.
    • I am more adept in Python than other languages.
    • I believe the underlying idea can be transposed to any language thanks to the Chrome DevTools Protocol.

    🚧 Note: While I'm passionate about this project, you should understand that this isn't a very serious project.
    The main purpose is to deliver a message and share a concept.

    🔍 Key Features:

    • Seamless BrowserAutomationStudio Integration.
    • Unique fingerprinting via FingerprintSwitcher (Paid feature).
    • Efficient management with Playwright.
    • Executing Browser Automation Studio Actions from Python: Implement BAS actions from Python using the un-documented
      API. This includes actions such as retrieving page source, emulating mouse movements, etc.
      (Note: Not all functions are currently supported).

    📸 Screenshots:

    Pycharm IDE:

    🛠 Requirements:

    • Windows 10/11, Windows Server 2022 (21H2 tested).
    • Python 3.11+
    • Git, Poetry & more.
    • 📝 Experience:
      • Familiarity with Python programming.
      • Knowledge of Git version control.
      • Understanding of dependency management, preferably with Poetry.

    🔧 Get Started:

    1. Clone the repo.
    2. Install dependencies with Poetry.
    3. Dive into the initial
      and worker scripts to grasp the flow.

    🙌 Contribute:

    Got ideas or improvements? Open an issue on GitHub.

    Step into the future of web automation with py-bas-automation😎!

    🚫 No Private Support:

    I do not provide free support via private messaging on forums, Telegram, or other platforms. For questions,
    clarifications, or any issues you encounter, kindly post your message here or create a new GitHub issue.

    This helps maintain transparency and also benefits others who might have similar queries.

    Please use English language because it is an English topic. Thanks.

  • Very nice
    thank you
    Will give it a shot later

  • 要是能做成插件就好,提供一些功能。我觉得playwright的等待非常不错,其次就是查找元素节点非常方便,可以通过各种方式。我说的这两个bas做的都不行。

  • @shux said in py-bas-automation: Supercharge BAS with Python:

    要是能做成插件就好,提供一些功能。我觉得playwright的等待非常不错,其次就是查找元素节点非常方便,可以通过各种方式。我说的这两个bas做的都不行。

    Please use English language because it is an English topic. Thanks.

  • It would be great if it could be developed as a plugin, providing some functionalities. I think Playwright's wait feature is excellent, and the element node lookup is very convenient as it can be done in various ways. The two BAS tools I mentioned earlier don't perform well in these aspects.

  • @shux said in py-bas-automation: Supercharge BAS with Python:

    It would be great if it could be developed as a plugin, providing some functionalities.

    Well, BAS has some APIs to communicate with any programming language, such as Node.js, and there are PDF documents available for reference:

    https://community.bablosoft.com/topic/4559/как-добавить-новый-встроенный-язык

    However, this plugin doesn't fit my needs. I enjoy coding in plain Python, creating tests, and running them. I'm also skilled at identifying and resolving issues in my code using debuggers. I prefer using PyCharm as my go-to coding tool and don't have a strong liking for BAS's built-in features.

    I believe this plugin might be more suitable for beginners, but it could be more challenging to develop and may not perform as well.

    I started this project with the goal of minimising my use of the BAS IDE and relying more on writing scripts. Essentially, all I require from BAS is web browsers.

  • @sergerdn
    The mouse movement and click functionalities of BAS are a level higher than Playwright. However, most of the other functionalities are not as good as Playwright.

  • you can try playwright+gologin

  • Actually, fingerprints are not useful.

  • If a website is actively trying to detect you, a browser fingerprint will likely not pass the detection. However, if there is no such detection in place, then there is even less need for a browser fingerprint.

  • @shux said in py-bas-automation: Supercharge BAS with Python:

    The mouse movement and click functionalities of BAS are a level higher than Playwright. However, most of the other functionalities are not as good as Playwright.

    If you are a premium user, please review the source code of BAS for this functionality. There isn't any magic involved, I believe. I did this just a few days ago.

    Yes, BAS has a few built-in features to anticipate, but developing a script, as I did several years ago, is more suitable for my needs.

    However, if you need a car, create one. I needed a car, so I built one.

  • @sergerdn
    The core functionalities of BAS are written in C++, which can be difficult to understand for some people.

  • @shux said in py-bas-automation: Supercharge BAS with Python:

    @sergerdn
    The core functionalities of BAS are written in C++, which can be difficult to understand for some people.

    I've been thinking about how to invoke certain actions in BAS from Python code, but I don't have a solution at the moment. I've implemented a one-way logic, but in this case, I'll need to implement two-way communication.

    If you have any ideas on how this can be accomplished, I would greatly appreciate hearing from you or any forum member.

  • This post is deleted!
  • @shux said in py-bas-automation: Supercharge BAS with Python:

    @sergerdn
    The mouse movement and click functionalities of BAS are a level higher than Playwright. However, most of the other functionalities are not as good as Playwright.

    I have implemented the ability to call BAS actions from Python code, such as emulating mouse movements.

    Please feel free to ask me about any other features or suggest improvements.

  • Please add support for free version of fingerprint switcher which is available in BAS as well as the Javascript modules such as fingerprint with pupeeteer and others.

  • @tatwa said in py-bas-automation: Supercharge BAS with Python:

    Please add support for free version of fingerprint switcher which is available in BAS as well as the Javascript modules such as fingerprint with pupeeteer and others.

    I'd like to make you aware that I primarily maintain that library for personal use, and I never utilize browser profiles with free keys.

    As a result, I strongly believe that opting for a basic browser with a free fingerprint is not the ideal choice.

    Regrettably, at present, I only support paid fingerprints. Perhaps I will consider changing that logic in the future.

  • @sergerdn Adding free fingerprints won't take much efforts, just change the request to work without the key, also have you added perfectcanvas detection? Add a functionality to detect perfectcanvas requests and autosave it as well as autoreplace it so that the detections can be bypassed.

  • @tatwa said in py-bas-automation: Supercharge BAS with Python:

    Adding free fingerprints won't take much efforts, just change the request to work without the key

    Well, it's not so easy. I need to rewrite all of my code that relies on the fingerprint because my code expects the fingerprint_key to be both non-empty and valid in every instance.

    Additionally, I must rewrite some tests to ensure that both the old and new functionality work as expected.

    @tatwa said in py-bas-automation: Supercharge BAS with Python:

    also have you added perfectcanvas detection?

    Not yet.

  • @sergerdn Why did you delete the post comparing Bablosoft mouse and keyboard emulation and Playwright emulation? It was useful information.