Tool for taking automated screenshots
Project description
shot-scraper
Tool for taking automated screenshots
Installation
Install this tool using pip
:
pip install shot-scraper
The tool runs playwright
using npx playwright
, so your system will need to have npm
configured in such a way that the following works:
npx playwright --help
Usage
This tool is configured using a YAML file. Create a file called shots.yml
that looks like this:
- output: example.com.png
url: http://www.example.com/
- output: w3c.org.png
url: https://www.w3.org/
Then run the tool like so:
shot-scraper shots.yml
This will create two image files, example.com.png
and w3c.org.png
, containing screenshots of those two URLs.
The screenshots default to being 1280px wide and as long as needed to capture the full page.
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd shot-scraper
python -m venv venv
source venv/bin/activate
Or if you are using pipenv
:
pipenv shell
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file shot-scraper-0.1a0.tar.gz
.
File metadata
- Download URL: shot-scraper-0.1a0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 392db83a74e7ec620f87f3db472e803ab2d63dabd72621986c861c9de3808ffd |
|
MD5 | bcefec0fde22ca4442bbb3fd486efaa5 |
|
BLAKE2b-256 | e881ffcfa0f358f7d54778e0c4e87456da5aff837a3401d27783bc8cb162b8da |
File details
Details for the file shot_scraper-0.1a0-py3-none-any.whl
.
File metadata
- Download URL: shot_scraper-0.1a0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6f1130b78a93280730d7e67ac4483666cc135cfc467f2b8160769ade7e16aa0 |
|
MD5 | 5b1500bde6d76b5725ceb2938b7a2d32 |
|
BLAKE2b-256 | 4a5fcdfc7d959f81b5d710241025b981e1459ea926c09218d6cb68b8df7e6d77 |