pyshotty
A firefox selenium based screenshot package for use with flask
Error while running selenium in a flask route brought me to create this.
Although that I realised soon my error was elsewhere, I now have a condensed easy format to grab website screenshots
Prerequisites
- Ubuntu
- Firefox
sudo apt-get install firefox - geckodriver
sudo apt-get install firefox-geckodriver
Features
- Grab screenshots from any website (in .png, .jpg or PIL image format)
- Choose browser size (essentially screenshot size)
Installation
Download and install can be done through PyPi
pip install pyshotty
or
git clone https://github.com/lewis-morris/pyshotty
cd pyshotty
pip install -e .
Pending Features
- Alternative image formats
- grab via Chrome selenium
- passing command line parameters
How to use
Minimal working example
from pyshotty import Firefox
screen = Firefox()
filename = screen.grab("www.google.com")
output: /tmp/tempscreenshot.png
Full Example
I always find it best to learn by example so follow this jupyter notebook to see the flow.
All classes have doc strings, so you can always check there if you get stuck.
Contact
If you have any issues or just want to chat you can always email me at lewis.morris@gmail.com or open an issue.
Metadata
Release files for pyshotty 0.0.3.5
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 |
|---|---|---|---|---|
| pyshotty-0.0.3.5.tar.gz | 3.8 kB | Without provenance | Details for pyshotty-0.0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyshotty-0.0.3.5-py3-none-any.whl | Python 3 | none | any | Details for pyshotty-0.0.3.5-py3-none-any.whl |
Total release size: 7.7 kB
Release files / pyshotty-0.0.3.5.tar.gz
| Download URL | pyshotty-0.0.3.5.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87a465d5f913ecc4a7bbcf90adcf5655873abfaf8b8ffc1c056a8b4c2656b512
|
|
BLAKE2b-256 checksum How to use checksums |
7dd7277036a712d0ebf5c2652f6b6bca5dc32bfa09d4bb6ecb2b1cf7a4165919
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5
|
Release files / pyshotty-0.0.3.5-py3-none-any.whl
| Download URL | pyshotty-0.0.3.5-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd6124995704a3a2de6231bf906b1128c0fc3c3648692c8e24f195d0fc7ef376
|
|
BLAKE2b-256 checksum How to use checksums |
322ffe8f0bd723d47af1a8313ddeac2e99b17deb793025a55c4d9576699dffbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5
|
Security for pyshotty 0.0.3.5
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.