Skip to main content

Declarative web parsers

Project description

Soup Stars

Build Status

Version Python

Soup Stars is a framework for building web parsers with Python. It is designed to make building, deploying, and scheduling web parsers easier by simplifying what you need to get started.

Quickstart

pip install soupstars

The client is also available as a docker image.

docker pull soupstars/client

Building a parser

Create a new parser using the soupstars command. The create command will use a template parser.

soupstars create -m myparser.py

Parsers are simple python modules.

cat myparser.py

Notice that the only set up required is the special parse decorator and a variable named url for the web page you want to parse.

from soupstars import parse

url = "https://corbettanalytics.com/"

@parse
def h1(soup):
    return soup.h1.text

You can test that the parser functions correctly.

soupstars run -m myparser.py

Use soupstars --help to see a full list of available commands.

More documentation is available here.

Development

Start the docker services.

docker-compose up -d

Run the tests.

docker-compose run --rm client pytest -vs

Releasing

New tags that pass on CI will automatically be pushed to PyPI and docker hub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soupstars-2.11.5.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soupstars-2.11.5-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file soupstars-2.11.5.tar.gz.

File metadata

  • Download URL: soupstars-2.11.5.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.5

File hashes

Hashes for soupstars-2.11.5.tar.gz
Algorithm Hash digest
SHA256 5fc0a4bd7a75af61b911de949879411d1220983138cb89e0b1d61b663e2060bc
MD5 cbb4eb6f4fa197bd4ae5c80cc50ddbea
BLAKE2b-256 450f1edeb43beffe299f32a100d1cfb88ff345413572f3486bbddd9597b4ce76

See more details on using hashes here.

File details

Details for the file soupstars-2.11.5-py3-none-any.whl.

File metadata

  • Download URL: soupstars-2.11.5-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.5

File hashes

Hashes for soupstars-2.11.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7c1a1b954f5a7829fd9c17758d9e54eb1a434c1269758c5beb6db15c004cf3bb
MD5 03b8dd21794e9a1fbbc69621ea7d46f0
BLAKE2b-256 074107ea3443f26c610f85ec1310c09c8a5eb77cd12fa8424ab95406e73f15cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page