Skip to main content

ScraperETC

PyPI
Documentation Status
codecov
CI

ScraperETC is a lightweight Python package that streamlines browser automation and HTTP scraping. It wraps Selenium and requests with clean, Pythonic interfaces that remove the usual boilerplate - especially for waits, drivers, and headers. ScraperETC is designed with anti-bot detection in mind, using smart defaults to reduce the chance of blocks or bans.

Why Use ScraperETC?

  • Selenium imports are long, clunky, and almost impossible to remember. ScraperETC lets you write from scraper_etc import By and use By.ID, By.XPATH, etc., directly.
  • webdriver_wait() simplifies waiting for elements with built-in selector validation and multiple wait modes (located, all_located, clickable).
  • HTTP requests are often blocked by anti-bot filters. ScraperETC provides default headers that reduce detection without extra effort.
  • Verifying file downloads shouldn't require writing custom content checks. This package includes built-in PDF validation tools to save you time.

ScraperETC was built to reduce the friction of browser automation and HTTP scraping, especially when using headless Chrome.

Features

  • Minimal wrappers for selenium.webdriver.Chrome and undetected_chromedriver to get up and running fast
  • webdriver_wait() handles selector validation and WebDriverWait with three modes:
    • "located": wait for a single element to appear
    • "all_located": wait for multiple matching elements
    • "clickable": wait until the element is ready to be interacted with
  • Use By directly from scraper_etc, so you don’t have to remember where Selenium hides it
  • http_GET() adds default headers that mimic a modern browser to help you evade bot detection
  • Built-in tools for validating PDF downloads and checking response status
  • Optional exception-raising on failure to let you choose between passive and strict workflows
  • Currently supports only the Chrome web browser, which must be installed and available on your system PATH

Installation

pip install scraper-etc

Requires Python 3.10 or later.

Example Usage

from scraper_etc import setup_chrome_driver, webdriver_wait, http_GET_valid_pdf, By

# start a headless Chrome driver (using undetected_chromedriver under the hood)
driver = setup_chrome_driver(headless=True)

# wait for a div with a specific ID to appear
elem = webdriver_wait(driver, by="ID", selector="main")

# wait for a clickable button (alternative usage)
button = webdriver_wait(driver, by="XPATH", selector="//button", ec="clickable")

# use imported By class directly with driver methods
different_ele = drive.find_element(By.ID, "differentID")

# validate a remote PDF and save it
res = http_GET_valid_pdf("https://example.com/sample.pdf")
if res:
    with open("sample.pdf", "wb") as f:
        f.write(res.content)

Development

ScraperETC includes a modern CI/CD pipeline:

  • Ruff for linting and auto-formatting
  • mypy for static type checking
  • Bandit for security scanning
  • pytest with unit tests covering all core logic
  • Codecov integration for test coverage
  • GitHub Actions CI to run it all on push
  • Dependabot for automated dependency updates

CI workflows live in .github/workflows.

License

This project is released under CC0 (public domain). You are free to use, modify, and redistribute it without restriction.

Metadata

Release files for scraper-etc 0.1.5

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

Source distribution (sdist)

Source distribution for scraper-etc 0.1.5
File Size Uploaded
scraper_etc-0.1.5.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scraper-etc 0.1.5
File Interpreter ABI Platform
scraper_etc-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / scraper_etc-0.1.5.tar.gz

Download URL scraper_etc-0.1.5.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b41d290acbd14b302a2f86a4213e6762e4d7037306e97958dbecd32626134e7e
BLAKE2b-256 checksum
How to use checksums
626345819aba1584caf9ffa39f67269c185e35e5a80a561bac4c6d76e95552e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / scraper_etc-0.1.5-py3-none-any.whl

Download URL scraper_etc-0.1.5-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36b1fedde2d052757f66b1e6b7db79ff3620a15a0a0b49f8dcff14ff9ab0ff71
BLAKE2b-256 checksum
How to use checksums
6a757416e8f8e373bcb164a76380409e6cc95474cd92717b9deeec39f93933a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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