Skip to main content

scrab - Fuzzy content scraper

Python package PyPI - Python Version GitHub Release GitHub Release License: MIT

Fast and easy to use content scraper for topic-centred web pages, e.g. blog posts, news and wikis.

The tool uses heuristics to extract main content and ignores surrounding noise. No processing rules. No XPath. No configuration.

Installing

pip install scrab

Usage

scrab https://blog.post

Store extracted content to a file:

scrab https://blog.post > content.txt

ToDo List

  • Support <main> tag
  • Add support for lists
  • Add support for scripts
  • Add support for markdown output format
  • Download and save referenced images
  • Extract and embed links

Development

# Lint with flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

# Check with mypy
mypy ./scrab
mypy ./tests

# Run tests
pytest

Publish to PyPI:

rm -rf dist/*
python setup.py sdist bdist_wheel
twine upload dist/*

License

This project is licensed under the MIT License.

Release files for scrab 0.0.6

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

Source distribution (sdist)

Source distribution for scrab 0.0.6
File Size Uploaded
scrab-0.0.6.tar.gz 6.9 kB Details

Built distribution (wheel)

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

Total release size: 14.9 kB

Release files / scrab-0.0.6.tar.gz

Download URL scrab-0.0.6.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
196a2ef7f342a38c3998065e86fb60fde9e1d93e54c2f40f3850958cd1728b62
BLAKE2b-256 checksum
How to use checksums
8b9e2cb6cdf023fee7d5578ae43c1814bf212da117910ebc0b6ce8cb440685fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

Release files / scrab-0.0.6-py3-none-any.whl

Download URL scrab-0.0.6-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcb89f503fc5f813c65c49dc69eeb4d1f3ed31f1098e91fd71cb108792844c75
BLAKE2b-256 checksum
How to use checksums
00702a71e835571c5022782533c7c2eb628f02fcf1492581cb5f4c31dfe4043f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

3 release files

0.0.4

3 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

3 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