https://github.com/davidcornu/sawzall
Ruby bindings to https://github.com/rust-scraper/scraper
https://github.com/davidcornu/sawzall
Last synced: 3 months ago
JSON representation
Ruby bindings to https://github.com/rust-scraper/scraper
- Host: GitHub
- URL: https://github.com/davidcornu/sawzall
- Owner: davidcornu
- License: mit
- Created: 2025-04-19T19:11:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-04T22:51:07.000Z (about 1 year ago)
- Last Synced: 2025-05-07T08:58:29.291Z (about 1 year ago)
- Language: Rust
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sawzall 🪚
Sawzall wraps the Rust scraper library (https://github.com/rust-scraper/scraper) to make it easy to parse HTML documents and query them with CSS selectors.
```ruby
require "sawzall"
require "net/http"
doc = Sawzall.parse_document(Net::HTTP.get("example.org", "/"))
doc.select("title").first.text #=> "Example Domain"
```
> [!NOTE]
> Sawzall is a hobby project. Expect ongoing development and maintenance to be very much correlated to how much value it brings me as a learning resource and as a tool for my other projects.
>
> You are welcome to report bugs you run into or submit pull requests for changes that would make it more useful for your use-case, but please bear the above in mind.
## Installation
Install the gem and add to the application's Gemfile by executing:
```bash
bundle add sawzall
```
If bundler is not being used to manage dependencies, install the gem by executing:
```bash
gem install sawzall
```
## Usage
[API documentation](https://davidcornu.github.io/sawzall/)
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/davidcornu/sawzall.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).