Selenium Browser Controller for apt Firefox on Ubuntu 22.10
![Python 3.10][python_badge] ![License: AGPL v3][agpl3_badge] ![Code Style: Black][black_badge] ![Code Coverage][codecov_badge]
Initialises a Selenium browser controller for a specific firefox profile on an
Ubuntu 22.10 system for an apt installation of Firefox.
Put into a separate pip package to remove boiler-plate code from other repositories that control the browser.
Usage
First install this pip package with:
pip install browsercontroller
Then run:
from browsercontroller.get_controller import (
get_ubuntu_apt_firefox_controller,
)
get_ubuntu_apt_firefox_controller(url="https://www.startpagina.nl")
Hide automation/"are u human?"
Some entities use checks to verify you are human. at 20223-09-19 those can be evaded using either:
- playwright
- puppeteer
Installation playwright
pip install playwright
playwright install
Installation puppeteer
npm install puppeteer
npm install puppeteer-extra-plugin-stealth
npm install puppeteer puppeteer-extra puppeteer-extra-plugin-stealth
# Then run the example script with:
node puppeteer_stealth.js
Drawback playwright implementation
An example of each of those two options is included. One drawback of the way
playwright is used in this repository, is that the entire sequence of actions
must occur within a single method, because the playwright browsercontroller is
created within a Python with statement, and returning the Page object from
the initialisation function: initialise_playwright_browsercontroller() yields
"loop closed error."
Drawback puppeteer
It is implemented in javascript. Pypeteer is an archived Python approximation of puppeteer. However, that is limited in its functionalities and not supported anymore.
Warning:
Checks whether a snap version of Firefox is installed, and if yes, removes it
and installs an apt version of Firefox instead. You'll lose browser history,
logins and bookmarks if you don't have an apt version of Firefox.
Updating
Build the pip package with:
pip install --upgrade pip setuptools wheel
pip install twine
Install the pip package locally with:
pip install -e .
Upload the pip package to the world with:
rm -r dist
rm -r build
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/\*
Metadata
Release files for browsercontroller 0.0.13
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 | |
|---|---|---|---|---|
| browsercontroller-0.0.13.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| browsercontroller-0.0.13-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 14.1 kB
Release files / browsercontroller-0.0.13.tar.gz
| Download URL | browsercontroller-0.0.13.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1cc1abd220685efb38277cbb455b34c6f68b5c6761dd269bbb2d6a045e7f834
|
|
BLAKE2b-256 checksum How to use checksums |
33c3ec186ce380e34cb2d905a0df61138652eb950b478313f3efc0b52bd79859
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / browsercontroller-0.0.13-py2.py3-none-any.whl
| Download URL | browsercontroller-0.0.13-py2.py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
10052d14750e236c68cc1ab7aeb06231138e188b0b68f1816d2092f155794d38
|
|
BLAKE2b-256 checksum How to use checksums |
664b4a842b2e31178b2e6a973d4bded8fa86fb46876c5270acfe43fe38544a56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for browsercontroller 0.0.13
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.