beautifulsoup4


Namebeautifulsoup4 JSON
Version 4.9.3 PyPI version JSON
download
home_pagehttp://www.crummy.com/software/BeautifulSoup/bs4/
SummaryScreen-scraping library
upload_time2020-10-03 15:37:22
maintainer
docs_urlNone
authorLeonard Richardson
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Beautiful Soup is a library that makes it easy to scrape information
from web pages. It sits atop an HTML or XML parser, providing Pythonic
idioms for iterating, searching, and modifying the parse tree.

# Quick start

```
>>> from bs4 import BeautifulSoup
>>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML")
>>> print(soup.prettify())
<html>
 <body>
  <p>
   Some
   <b>
    bad
    <i>
     HTML
    </i>
   </b>
  </p>
 </body>
</html>
>>> soup.find(text="bad")
'bad'
>>> soup.i
<i>HTML</i>
#
>>> soup = BeautifulSoup("<tag1>Some<tag2/>bad<tag3>XML", "xml")
#
>>> print(soup.prettify())
<?xml version="1.0" encoding="utf-8"?>
<tag1>
 Some
 <tag2/>
 bad
 <tag3>
  XML
 </tag3>
</tag1>
```

To go beyond the basics, [comprehensive documentation is available](http://www.crummy.com/software/BeautifulSoup/bs4/doc/).

# Links

* [Homepage](http://www.crummy.com/software/BeautifulSoup/bs4/)
* [Documentation](http://www.crummy.com/software/BeautifulSoup/bs4/doc/)
* [Discussion group](http://groups.google.com/group/beautifulsoup/)
* [Development](https://code.launchpad.net/beautifulsoup/)
* [Bug tracker](https://bugs.launchpad.net/beautifulsoup/)
* [Complete changelog](https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/CHANGELOG)

# Note on Python 2 sunsetting

Since 2012, Beautiful Soup has been developed as a Python 2 library
which is automatically converted to Python 3 code as necessary. This
makes it impossible to take advantage of some features of Python
3.

For this reason, I plan to discontinue Beautiful Soup's Python 2
support at some point after December 31, 2020: one year after the
sunset date for Python 2 itself. Beyond that point, new Beautiful Soup
development will exclusively target Python 3. Of course, older
releases of Beautiful Soup, which support both versions, will continue
to be available.

# Supporting the project

If you use Beautiful Soup as part of your professional work, please consider a
[Tidelift subscription](https://tidelift.com/subscription/pkg/pypi-beautifulsoup4?utm_source=pypi-beautifulsoup4&utm_medium=referral&utm_campaign=readme).
This will support many of the free software projects your organization
depends on, not just Beautiful Soup.

If you use Beautiful Soup for personal projects, the best way to say
thank you is to read
[Tool Safety](https://www.crummy.com/software/BeautifulSoup/zine/), a zine I
wrote about what Beautiful Soup has taught me about software
development.

# Building the documentation

The bs4/doc/ directory contains full documentation in Sphinx
format. Run `make html` in that directory to create HTML
documentation.

# Running the unit tests

Beautiful Soup supports unit test discovery from the project root directory:

```
$ nosetests
```

```
$ python -m unittest discover -s bs4
```

If you checked out the source tree, you should see a script in the
home directory called test-all-versions. This script will run the unit
tests under Python 2, then create a temporary Python 3 conversion of
the source and run the unit tests again under Python 3.



            

Raw data

            {
    "_id": null,
    "home_page": "http://www.crummy.com/software/BeautifulSoup/bs4/",
    "name": "beautifulsoup4",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Leonard Richardson",
    "author_email": "leonardr@segfault.org",
    "download_url": "https://files.pythonhosted.org/packages/6b/c3/d31704ae558dcca862e4ee8e8388f357af6c9d9acb0cad4ba0fbbd350d9a/beautifulsoup4-4.9.3.tar.gz",
    "platform": "",
    "description": "Beautiful Soup is a library that makes it easy to scrape information\nfrom web pages. It sits atop an HTML or XML parser, providing Pythonic\nidioms for iterating, searching, and modifying the parse tree.\n\n# Quick start\n\n```\n>>> from bs4 import BeautifulSoup\n>>> soup = BeautifulSoup(\"<p>Some<b>bad<i>HTML\")\n>>> print(soup.prettify())\n<html>\n <body>\n  <p>\n   Some\n   <b>\n    bad\n    <i>\n     HTML\n    </i>\n   </b>\n  </p>\n </body>\n</html>\n>>> soup.find(text=\"bad\")\n'bad'\n>>> soup.i\n<i>HTML</i>\n#\n>>> soup = BeautifulSoup(\"<tag1>Some<tag2/>bad<tag3>XML\", \"xml\")\n#\n>>> print(soup.prettify())\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<tag1>\n Some\n <tag2/>\n bad\n <tag3>\n  XML\n </tag3>\n</tag1>\n```\n\nTo go beyond the basics, [comprehensive documentation is available](http://www.crummy.com/software/BeautifulSoup/bs4/doc/).\n\n# Links\n\n* [Homepage](http://www.crummy.com/software/BeautifulSoup/bs4/)\n* [Documentation](http://www.crummy.com/software/BeautifulSoup/bs4/doc/)\n* [Discussion group](http://groups.google.com/group/beautifulsoup/)\n* [Development](https://code.launchpad.net/beautifulsoup/)\n* [Bug tracker](https://bugs.launchpad.net/beautifulsoup/)\n* [Complete changelog](https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/CHANGELOG)\n\n# Note on Python 2 sunsetting\n\nSince 2012, Beautiful Soup has been developed as a Python 2 library\nwhich is automatically converted to Python 3 code as necessary. This\nmakes it impossible to take advantage of some features of Python\n3.\n\nFor this reason, I plan to discontinue Beautiful Soup's Python 2\nsupport at some point after December 31, 2020: one year after the\nsunset date for Python 2 itself. Beyond that point, new Beautiful Soup\ndevelopment will exclusively target Python 3. Of course, older\nreleases of Beautiful Soup, which support both versions, will continue\nto be available.\n\n# Supporting the project\n\nIf you use Beautiful Soup as part of your professional work, please consider a\n[Tidelift subscription](https://tidelift.com/subscription/pkg/pypi-beautifulsoup4?utm_source=pypi-beautifulsoup4&utm_medium=referral&utm_campaign=readme).\nThis will support many of the free software projects your organization\ndepends on, not just Beautiful Soup.\n\nIf you use Beautiful Soup for personal projects, the best way to say\nthank you is to read\n[Tool Safety](https://www.crummy.com/software/BeautifulSoup/zine/), a zine I\nwrote about what Beautiful Soup has taught me about software\ndevelopment.\n\n# Building the documentation\n\nThe bs4/doc/ directory contains full documentation in Sphinx\nformat. Run `make html` in that directory to create HTML\ndocumentation.\n\n# Running the unit tests\n\nBeautiful Soup supports unit test discovery from the project root directory:\n\n```\n$ nosetests\n```\n\n```\n$ python -m unittest discover -s bs4\n```\n\nIf you checked out the source tree, you should see a script in the\nhome directory called test-all-versions. This script will run the unit\ntests under Python 2, then create a temporary Python 3 conversion of\nthe source and run the unit tests again under Python 3.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Screen-scraping library",
    "version": "4.9.3",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "7131ff441c704c172ae022881d9d5998",
                "sha256": "4c98143716ef1cb40bf7f39a8e3eec8f8b009509e74904ba3a7b315431577e35"
            },
            "downloads": -1,
            "filename": "beautifulsoup4-4.9.3-py2-none-any.whl",
            "has_sig": false,
            "md5_digest": "7131ff441c704c172ae022881d9d5998",
            "packagetype": "bdist_wheel",
            "python_version": "py2",
            "requires_python": null,
            "size": 115928,
            "upload_time": "2020-10-03T15:37:19",
            "upload_time_iso_8601": "2020-10-03T15:37:19.573231Z",
            "url": "https://files.pythonhosted.org/packages/1c/d9/8c507915ff962b9e854b477b203c171074f59cce9465dac9f71c2b57ebd6/beautifulsoup4-4.9.3-py2-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "bc7da27acae18d1907995f602ee572fe",
                "sha256": "fff47e031e34ec82bf17e00da8f592fe7de69aeea38be00523c04623c04fb666"
            },
            "downloads": -1,
            "filename": "beautifulsoup4-4.9.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc7da27acae18d1907995f602ee572fe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 115807,
            "upload_time": "2020-10-03T15:37:21",
            "upload_time_iso_8601": "2020-10-03T15:37:21.018789Z",
            "url": "https://files.pythonhosted.org/packages/d1/41/e6495bd7d3781cee623ce23ea6ac73282a373088fcd0ddc809a047b18eae/beautifulsoup4-4.9.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "57fd468ae3eb055f6871106e8f7813e2",
                "sha256": "84729e322ad1d5b4d25f805bfa05b902dd96450f43842c4e99067d5e1369eb25"
            },
            "downloads": -1,
            "filename": "beautifulsoup4-4.9.3.tar.gz",
            "has_sig": false,
            "md5_digest": "57fd468ae3eb055f6871106e8f7813e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 376031,
            "upload_time": "2020-10-03T15:37:22",
            "upload_time_iso_8601": "2020-10-03T15:37:22.698961Z",
            "url": "https://files.pythonhosted.org/packages/6b/c3/d31704ae558dcca862e4ee8e8388f357af6c9d9acb0cad4ba0fbbd350d9a/beautifulsoup4-4.9.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-10-03 15:37:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "beautifulsoup4"
}
        
Elapsed time: 0.13705s