a Swift HTML Parser library for working with real-world HTML through a convenient API for extracting and manipulating data using DOM, CSS, and jquery-like methods.
SwiftSoup is a pure Swift HTML Parser library for working with real-world HTML. It provides a convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. SwiftSoup implements the WHATWG HTML5 specification, parsing HTML to the same DOM as modern browsers do.
Main features:
- Scrape and parse HTML from a URL, file, or string
- Find and extract data, using DOM traversal or CSS selectors
- Manipulate HTML elements, attributes, and text
- Sanitizing: Clean user-submitted content against a white-list, to prevent XSS attacks
- Deal with all varieties of HTML found in the wild; from validating to invalid tag-soup
- Output tidy HTML
SwiftSoup is available through CocoaPods, Carthage, and on GitHub.
For further information and documentation see
Author: Nabil Chatbi, scinfu@gmail.com
Note: SwiftSoup was ported to Swift from Java Jsoup library.
License: SwiftSoup is available under the MIT license.