METADATA 3.7 KB

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