Web-use
webuse is a http request library and a minimal headless browser, wrapped with the AI
buzzword -- the "Agent".
It can perform web-based actions on your command with natural languages, on par with
other "agent" libraries like browser-use or computer-use, but at a smaller
footprint.
As a project from the author of curl-cffi, webuse was built with impersonating human
behavior at the very beginning. So unlike other academic focused projects, webuse
tends to have lower rate of being detected as bot by WAFs like Cloudflare. In real
world, everyone have the same LLMs, such as ChatGPT, Claude and DeepSeek, so the
ability to mimic human behavior becomes the key differentiator for success rate.
This is a opinionated library, we only support certain preferred tools at core. However, feel free to contribute and maintain your flavor.
Features(to be implemented)
- Execute JavaScript directly, like
pyexecjs, but via API.- Pass a piece of script and execute directly.
- Register a script to be called later via name or id.
- Create virtual env with custom patches.
- Use JS RPC to call the algorithm on host page.
- Execute functions directly within the page context.
- Register additional scripts to the page.
- Docker image for one-click install as a service.
- Call webuse as a headless browser, without the
webdriverattributes.- Integrate common anti-detect scripts from Undetected chromedriver
- Generate random values for JS based fingerprints.
Usage
pip install webuse
On Linux servers, it's best to run this with xvfbwrapper
The main interface is a simple webbrowser-like UI for debuggin purposes. Once started, A HTTP API will be exposed for you to interact with cute agent.
When a render request is submitted, a tab will be selected to render the page, once finished, the content will be cached to a pool, waiting for retrieval, and the tab will be recycled.
The cache will be removed after a given time or once it is retrieved.
Headless browser
You do not need to create a patched environment to emulate the browser, because it's indeed a real WebKit based browser. On the other hand, it's built for crawling, not testing. It's much easier to manage a wkenv service than a Playwright or Selenium service.
TODO
- Make the UI better, more browser-like
- Add mulitple webview for parallelized rendering
- Add lock when a webview is occupied for rendering
- When all tabs are being used, return a busy error
- Add a pool for caching rendered content
- Add a busy wait endpoint for retrieving the content
Acknowledgements
PySide6 tutorial: https://www.pythonguis.com/pyqt6/
Metadata
Release files for webuse 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| webuse-0.0.1.tar.gz | 5.6 kB | Without provenance | Details for webuse-0.0.1.tar.gz |
Release files / webuse-0.0.1.tar.gz
| Download URL | webuse-0.0.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5698647e8c6ab0f45334b11e4e3fc6c6490eedf32346afa3731e501df6fc2225
|
|
BLAKE2b-256 checksum How to use checksums |
7ba90471b9413343629eea0958fba85f879096dcd2a4120de53594d006e769fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for webuse 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.