Soupstars |:stew:| |:star:| |:boom:| ==================================== .. image:: https://travis-ci.org/tjwaterman99/soupstars.svg?branch=master :target: https://travis-ci.org/tjwaterman99/soupstars.svg?branch=master .. image:: https://coveralls.io/repos/github/tjwaterman99/soupstars/badge.svg?branch=master :target: https://coveralls.io/repos/github/tjwaterman99/soupstars/badge.svg?branch=master .. image:: https://readthedocs.org/projects/soupstars/badge/?version=latest :target: https://readthedocs.org/projects/soupstars/badge/?version=latest .. image:: https://badge.fury.io/py/soupstars.svg :target: https://badge.fury.io/py/soupstars .. image:: https://img.shields.io/pypi/pyversions/soupstars.svg :target: https://img.shields.io/pypi/pyversions/soupstars.svg Soupstars makes it easier than ever to build web parsers in Python. Install it with pip. .. code-block:: bash pip install soupstars Let's go! Quickstart ~~~~~~~~~~ You need two objects to get started. .. code-block:: python >>> from soupstars import Parser, serialize We'll build a parser to extract data from a github page. .. code-block:: python >>> 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. .. code-block:: python >>> parser = GithubParser("https://github.com/tjwaterman99/soupstars") Let's see what we've got! .. code-block:: python >>> parser.to_dict() {'title': 'tjwaterman99/soupstars'} You're now ready to start building your own web parsers with `soupstars`. Nice job. |:beers:| Going further ~~~~~~~~~~~~~ We recommend starting with the examples. .. toctree:: :maxdepth: 3 examples For more specific questions about using the library, refer to the api documentation. .. toctree:: :maxdepth: 3 api