Skip to main content

Declarative web parsers

Project description

Soupstars :stew: :star: :boom:

Build Status Coverage Status Docs Version Image

Soupstars makes it easier than ever to build web parsers in Python.

Install it with pip.

pip install soupstars

Let's go!

Quickstart

You need two objects to get started.

>>> from soupstars import Parser, serialize

We'll build a parser to extract data from a github page.

>>> class GithubParser(Parser):
...    "Parse data from a github page"
...
...    @serialize
...    def title(self):
...        return str(self.h1.text.strip())

Now all we need is a github web page to parse.

>>> parser = GithubParser("https://github.com/tjwaterman99/soupstars")

Let's see what we've got!

>>> parser.to_dict()
{'title': 'tjwaterman99/soupstars'}

You're now ready to start building your own web parsers with soupstars. Nice job. :beers:

Going further

Contributing

We're thrilled you asked! Just open a PR on github, and we'll take a look.

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-1.0.6.tar.gz (3.6 kB view details)

Uploaded Source

Built Distributions

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

soupstars-1.0.6-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

soupstars-1.0.6-py2-none-any.whl (5.2 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: soupstars-1.0.6.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14

File hashes

Hashes for soupstars-1.0.6.tar.gz
Algorithm Hash digest
SHA256 276b6a1b97dc9051557bdfbf05cd017dddd07f91127812b78a19cfcf193b7253
MD5 9600331a3519e0f19d5348afc8c030fb
BLAKE2b-256 88c3b61529cfca0b6ff7450e9ebd803ea2a5d6e3e9ba639900cd663bddaba55c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: soupstars-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.6

File hashes

Hashes for soupstars-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8bafd81a3ad470bdcf683fd9ae3cca997a8ccca4158878ada32e23b82f3bb92b
MD5 963105c6f1c5e3af7674c0af84010da7
BLAKE2b-256 08122e7123d799a43d37465f246bd1dcd2b7405cad69eeabd801f0b20312637b

See more details on using hashes here.

File details

Details for the file soupstars-1.0.6-py2-none-any.whl.

File metadata

  • Download URL: soupstars-1.0.6-py2-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14

File hashes

Hashes for soupstars-1.0.6-py2-none-any.whl
Algorithm Hash digest
SHA256 199b2e161bf4495d9a85e89ca7460d7167622ab9457285fe84616423844c92aa
MD5 40f4929fff4bae6c0c972083ff8e8ef8
BLAKE2b-256 bbe32654592bc87760c10e6bf46a7067e1f2a9d656c7824e62465a45de60a005

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