Skip to main content

Scraper

A simple and practical Python web scraper for real‑world websites. It supports normal HTTP scraping, JavaScript rendering via Playwright, rate limiting, pagination, form submission, file downloads, and structured data extraction.

Designed to be usable, reliable, and flexible.


Features

  • HTTP scraping with httpx
  • Automatic fallback to browser mode (Playwright) when blocked
  • JavaScript rendering support
  • Rate limiting
  • Parallel fetching
  • Table extraction with rowspan / colspan
  • Pagination (patterned pages + "Next" button)
  • JSON endpoints
  • Form submission
  • Image and file downloading
  • CSV / JSON export
  • Logging system

Install

pip install httpx beautifulsoup4 playwright
playwright install chromium

Basic Usage

from scraper import Scraper

s = Scraper(url="https://example.com", debug=True)
s.fetch()

print(s.get_text("h1"))
print(s.get_links())

Common Examples

Fetch a page

s.fetch("https://example.com")

Force JS rendering

s.fetch("https://site.com", use_browser=True)
# or
s.render_js()

Extract text

s.get_text(".title")
s.get_text_clean(".content")

Get links & images

s.get_links()
s.get_images()

Extract tables

table = s.get_table()

Scrape paginated pages

s.scrape_pages("https://site.com/page/{}", 5, ".item")

Auto "Next" pagination

s.scrape_auto_next("https://site.com", ".post")

Parallel fetch

urls = ["https://a.com", "https://b.com"]
s.fetch_multiple(urls, workers=5)

JSON API

s.get_json("https://api.site.com/data")

Submit form

s.submit_form("https://site.com/login", {
    "user": "name",
    "pass": "password"
})

Download files

s.download_file(url, "file.pdf")
s.download_images("images/")

Export

s.export_csv(data, "data.csv")
s.export_json(data, "data.json")

Close resources

s.close()

Notes

  • Automatically switches to browser mode if blocked
  • Thread‑safe request handling
  • Suitable for large scraping jobs

Release files for ezextract 0.1.2

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

Source distribution (sdist)

Source distribution for ezextract 0.1.2
File Size Uploaded
ezextract-0.1.2.tar.gz 9.9 kB Details

Built distribution (wheel)

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

Total release size: 18.4 kB

Release files / ezextract-0.1.2.tar.gz

Download URL ezextract-0.1.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5691ae52ab1d509e772716002392628f75561f7d528ad90996601eda8ebd33e1
BLAKE2b-256 checksum
How to use checksums
bdef5c0b667a18c647b70e78d1181a8393b1da7d8de63dbcb7d1b1997e3a5685
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / ezextract-0.1.2-py3-none-any.whl

Download URL ezextract-0.1.2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ff133ee7bad61bd470d27a0554558191b08c6bc66dfa5e81ba15311aa2329a7
BLAKE2b-256 checksum
How to use checksums
bab7bc77b01886c19f1dde24e9a7802d36e4ee8ce0c2b4bd3899524a3f574875
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.2 This release

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