https://github.com/michaelcurrin/html-screenshot-py
Take fullpage screenshots for a batch of URLs with this easy CLI tool
https://github.com/michaelcurrin/html-screenshot-py
html image python screenshot selenium webscraper
Last synced: about 1 year ago
JSON representation
Take fullpage screenshots for a batch of URLs with this easy CLI tool
- Host: GitHub
- URL: https://github.com/michaelcurrin/html-screenshot-py
- Owner: MichaelCurrin
- License: mit
- Created: 2021-10-26T09:50:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T13:56:28.000Z (over 1 year ago)
- Last Synced: 2025-03-01T05:31:54.536Z (over 1 year ago)
- Topics: html, image, python, screenshot, selenium, webscraper
- Language: Python
- Homepage: https://michaelcurrin.github.io/html-screenshot-py/
- Size: 111 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTML Screenshot PY 🌐 🖼 🐍
> Take fullpage screenshots for a batch of URLs with this easy CLI tool
[](https://github.com/MichaelCurrin/html-screenshot-py/releases/)
[](#license)
[](https://python.org)
[](https://pypi.org/project/selenium)
[](https://pypi.org/project/requests)
## About
An easy Python CLI tool. Provide it a batch of one or more URLs as webpages to scrape. Whether for your own sites or by someone else.
### Formats
It uses two approaches, depending on the format:
- **HTML pages** - The tool will go through each to load the page, take a screenshot of the _entire_ page and save it a PNG file. Using _selenium_.
- **Binary data** - For files with a PDF or image extension, the file will be downloaded directly (for speed and reliability) instead of trying to take a screenshot (which could be massive for PDFs with many pages). Using _requests_.
### Use cases
When you should use this tool:
- **Archive** - Save a once-off copy of an article or a page design that inspires you, before it moves or disappears from the internet. Add as many URLS you like and download all of them.
- **Software development** - Create visual snapshots of a page on your website to track improvements and fixes over time. Or watch how a competitor's website changes.
## Dependencies
See [Requirements](/docs/installation.md#requirements).
## Sample usage
For one webpage, here using https://example.com/ which is a real site you can test against:
```sh
$ python -m htmlscreenshot.scrape 'https://example.com'
```
For multiple pages:
```sh
$ python -m htmlscreenshot ~/path/to/urls.txt
```
Then find your screenshots as PNGs in the project's output directory.
## Documentation
[](https://michaelcurrin.github.io/html-screenshot-py/ "Go to docs site")
## License
Released under [MIT](/LICENSE) by [@MichaelCurrin](https://github.com/MichaelCurrin).