Skip to main content

Pywebcapture

A package that allows users to capture full-page screenshots of websites using Selenium and Chrome webdriver.

Tested with Python version 3.8.3

Installation

  1. Download the latest version of Chrome webdriver
  2. Add chrome webdriver path to your system PATH (its also possible to pass the absolute path of your driver to the Driver instance)
  3. Run pip install pywebcapture

Basic Usage

Import the modules:

from pywebcapture import loader, driver

Use the CSVLoader to load your csv file containing the urls and optional file names:

Options:

  • input_filepath - The absolute path to your csv file (str)
  • has_header - Whether your csv has a header row or now (bool)
  • uri_column - The column that contains the uri's, can use either column name (str) or the index position (int)
  • filename_column - The column that contains the desired file names (str), can be set to None, where the driver will use the uri netloc as the filename
csv_file = loader.CSVLoader("example.csv", True, 3, None)

Call the get_uri_dict() method from the CSVLoader instance, this parses the CSV into a Python dictionary:

uri_dict = csv_file.get_uri_dict()

Create instance of the web driver:

Options:

  • driver_path - This is the absolute path to the chrome webdriver, if None or "chromedriver" it will attempt to search %PATH
  • output_path - This is the output path that you want to save screen shots at (str)
  • delay - This is the delay in seconds between each page request, minimum is 2 seconds, please crawl pages respectfully :)
  • uri_dict - The Python dictionary containing your file names and uri's
d = driver.Driver("path/to/chrome/webdriver", None, 3, uri_dict)

Run the driver, this will loop through all uri's, get the maximum scrollheight and then take a screenshot

d.run()

Metadata

Release files for pywebcapture 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywebcapture 0.0.3
File Size Uploaded Provenance
pywebcapture-0.0.3.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pywebcapture 0.0.3
File Interpreter ABI Platform
pywebcapture-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / pywebcapture-0.0.3.tar.gz

Download URL pywebcapture-0.0.3.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
470cc51e1c6069cb4fb0ea5d8819f2528a6a26c5f17348ab89c7e305f8475c49
BLAKE2b-256 checksum
How to use checksums
b20b88dfdaf7c686c0bee7a1fc7bbb1a21a24637e48ba990b25d934890cdf492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

Release files / pywebcapture-0.0.3-py3-none-any.whl

Download URL pywebcapture-0.0.3-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
240571b52dc496f33420240f824f6a15c6950ecc81172d0a2202cffe502f5833
BLAKE2b-256 checksum
How to use checksums
89a42935b5dabaa4c6c411b40591587552e286d7d307948ec40747e56fdc9749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

Security for pywebcapture 0.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page