html-screenshot-py

Take fullpage screenshots for a batch of URLs with this easy CLI tool

MIT License

Stars
2

HTML Screenshot PY 🌐 🖼 🐍

Take fullpage screenshots for a batch of URLs with this easy CLI tool

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.

Sample usage

For one webpage:

$ python -m htmlscreenshot.scrape 'https://example.com'

For multiple pages:

$ python -m htmlscreenshot ~/path/to/urls.txt

Then find your screenshots as PNGs in the project's output directory.

Documentation

License

Released under MIT by @MichaelCurrin.

Badges
Extracted from project README
GitHub tag License Made with Python dependency - selenium dependency - requests view - Documentation