{ "info": { "author": "chrisnbeaumont@gmail.com", "author_email": "chrisnbeaumont@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "Soupy\n=====\n\n|Build Status| |Coverage Status|\n\nSoupy is a wrapper around BeautifulSoup that makes it easier to build\ncomplex queries when wrangling web data.\n\nHere's an example of a Soupy query.\n\n.. code:: python\n\n from soupy import Soupy, Q\n\n html = \"\"\"\n
\n
The web is messy
\n and full of traps\n
but Soupy loves you
\n
\"\"\"\n\n print(Soupy(html).find(id='main').children\n .each(Q.text.strip()) # extract text from each node, trim whitespace\n .filter(len) # remove empty strings\n .val()) # dump out of Soupy\n\n # ['The web is messy', 'and full of traps', 'but Soupy loves you']\n\nThe same query using BeautifulSoup:\n\n.. code:: python\n\n from bs4 import BeautifulSoup, NavigableString\n\n html = \"\"\"\n
\n
The web is messy
\n and full of traps\n
but Soupy loves you
\n
\"\"\"\n\n result = []\n for node in BeautifulSoup(html).find(id='main').children:\n if isinstance(node, NavigableString):\n text = node.strip()\n else:\n text = node.text.strip()\n if len(text):\n result.append(text)\n\n print(result)\n\nFor more information, see the `Soupy\nDocumentation `__\n\nInstallation\n------------\n\n::\n\n pip install soupy\n\nDependencies\n------------\n\nsix and BeautifulSoup4\n\nSoupy is supported on Python 2.6+ and 3.3+\n\n.. |Build Status| image:: https://travis-ci.org/ChrisBeaumont/soupy.svg?branch=master\n :target: https://travis-ci.org/ChrisBeaumont/soupy\n.. |Coverage Status| image:: https://coveralls.io/repos/ChrisBeaumont/soupy/badge.svg\n :target: https://coveralls.io/r/ChrisBeaumont/soupy", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ChrisBeaumont/soupy", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "soupy", "package_url": "https://pypi.org/project/soupy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/soupy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/ChrisBeaumont/soupy" }, "release_url": "https://pypi.org/project/soupy/0.3/", "requires_dist": null, "requires_python": null, "summary": "Easier wrangling of web documents", "version": "0.3" }, "last_serial": 1503836, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3cf5bfa00fc576a679f59ca43b70eb33", "sha256": "ce9e187437ac312b28c7a841ad24514d1b8f143567bec4b1b563e29dbf34500f" }, "downloads": -1, "filename": "soupy-0.1.tar.gz", "has_sig": false, "md5_digest": "3cf5bfa00fc576a679f59ca43b70eb33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7361, "upload_time": "2015-04-05T05:53:05", "url": "https://files.pythonhosted.org/packages/cb/6e/c97a1444272a7890cb0669fe05b3514c45c32d9ea069b326fd13463c312f/soupy-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "86ee9c74ddf06e083906c2f7e1c84bc3", "sha256": "dd920ae4da885ee4ae11a28982adfc448b764f00fe0a6da6a369f399dff0fc95" }, "downloads": -1, "filename": "soupy-0.2.tar.gz", "has_sig": false, "md5_digest": "86ee9c74ddf06e083906c2f7e1c84bc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8320, "upload_time": "2015-04-06T15:10:16", "url": "https://files.pythonhosted.org/packages/27/de/011e743271c3f8e78ad03dd31bb71e71a8da5fdf2ddf47872dacd52df3b6/soupy-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "3826ff46df881f75ee823b161f504513", "sha256": "a65ab9a2f83827df6e0cb2890c94bac7c847082752ba73c094b11c3213a345eb" }, "downloads": -1, "filename": "soupy-0.3.tar.gz", "has_sig": false, "md5_digest": "3826ff46df881f75ee823b161f504513", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10094, "upload_time": "2015-04-13T20:53:47", "url": "https://files.pythonhosted.org/packages/76/b0/badfa91b5789a8af211e32e9836498cdab749b9ec2dd5346b2349f049d06/soupy-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3826ff46df881f75ee823b161f504513", "sha256": "a65ab9a2f83827df6e0cb2890c94bac7c847082752ba73c094b11c3213a345eb" }, "downloads": -1, "filename": "soupy-0.3.tar.gz", "has_sig": false, "md5_digest": "3826ff46df881f75ee823b161f504513", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10094, "upload_time": "2015-04-13T20:53:47", "url": "https://files.pythonhosted.org/packages/76/b0/badfa91b5789a8af211e32e9836498cdab749b9ec2dd5346b2349f049d06/soupy-0.3.tar.gz" } ] }