METADATA 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. Metadata-Version: 2.1
  2. Name: beautifulsoup4
  3. Version: 4.11.1
  4. Summary: Screen-scraping library
  5. Home-page: https://www.crummy.com/software/BeautifulSoup/bs4/
  6. Author: Leonard Richardson
  7. Author-email: leonardr@segfault.org
  8. License: MIT
  9. Download-URL: https://www.crummy.com/software/BeautifulSoup/bs4/download/
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 5 - Production/Stable
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: MIT License
  14. Classifier: Programming Language :: Python
  15. Classifier: Programming Language :: Python :: 3
  16. Classifier: Topic :: Text Processing :: Markup :: HTML
  17. Classifier: Topic :: Text Processing :: Markup :: XML
  18. Classifier: Topic :: Text Processing :: Markup :: SGML
  19. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  20. Requires-Python: >=3.6.0
  21. Description-Content-Type: text/markdown
  22. Provides-Extra: lxml
  23. Provides-Extra: html5lib
  24. Requires-Dist: soupsieve (>1.2)
  25. Provides-Extra: html5lib
  26. Requires-Dist: html5lib; extra == 'html5lib'
  27. Provides-Extra: lxml
  28. Requires-Dist: lxml; extra == 'lxml'
  29. Beautiful Soup is a library that makes it easy to scrape information
  30. from web pages. It sits atop an HTML or XML parser, providing Pythonic
  31. idioms for iterating, searching, and modifying the parse tree.
  32. # Quick start
  33. ```
  34. >>> from bs4 import BeautifulSoup
  35. >>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML")
  36. >>> print(soup.prettify())
  37. <html>
  38. <body>
  39. <p>
  40. Some
  41. <b>
  42. bad
  43. <i>
  44. HTML
  45. </i>
  46. </b>
  47. </p>
  48. </body>
  49. </html>
  50. >>> soup.find(text="bad")
  51. 'bad'
  52. >>> soup.i
  53. <i>HTML</i>
  54. #
  55. >>> soup = BeautifulSoup("<tag1>Some<tag2/>bad<tag3>XML", "xml")
  56. #
  57. >>> print(soup.prettify())
  58. <?xml version="1.0" encoding="utf-8"?>
  59. <tag1>
  60. Some
  61. <tag2/>
  62. bad
  63. <tag3>
  64. XML
  65. </tag3>
  66. </tag1>
  67. ```
  68. To go beyond the basics, [comprehensive documentation is available](https://www.crummy.com/software/BeautifulSoup/bs4/doc/).
  69. # Links
  70. * [Homepage](https://www.crummy.com/software/BeautifulSoup/bs4/)
  71. * [Documentation](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)
  72. * [Discussion group](https://groups.google.com/group/beautifulsoup/)
  73. * [Development](https://code.launchpad.net/beautifulsoup/)
  74. * [Bug tracker](https://bugs.launchpad.net/beautifulsoup/)
  75. * [Complete changelog](https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/CHANGELOG)
  76. # Note on Python 2 sunsetting
  77. Beautiful Soup's support for Python 2 was discontinued on December 31,
  78. 2020: one year after the sunset date for Python 2 itself. From this
  79. point onward, new Beautiful Soup development will exclusively target
  80. Python 3. The final release of Beautiful Soup 4 to support Python 2
  81. was 4.9.3.
  82. # Supporting the project
  83. If you use Beautiful Soup as part of your professional work, please consider a
  84. [Tidelift subscription](https://tidelift.com/subscription/pkg/pypi-beautifulsoup4?utm_source=pypi-beautifulsoup4&utm_medium=referral&utm_campaign=readme).
  85. This will support many of the free software projects your organization
  86. depends on, not just Beautiful Soup.
  87. If you use Beautiful Soup for personal projects, the best way to say
  88. thank you is to read
  89. [Tool Safety](https://www.crummy.com/software/BeautifulSoup/zine/), a zine I
  90. wrote about what Beautiful Soup has taught me about software
  91. development.
  92. # Building the documentation
  93. The bs4/doc/ directory contains full documentation in Sphinx
  94. format. Run `make html` in that directory to create HTML
  95. documentation.
  96. # Running the unit tests
  97. Beautiful Soup supports unit test discovery using Pytest:
  98. ```
  99. $ pytest
  100. ```