Soupstars 🍲 ⭐ 💥

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

Install it with pip.

pip install soupstars

Let’s go!


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("")

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. 🍻

Going further

We recommend starting with the examples.

For more specific questions about using the library, refer to the api documentation.