Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dist1ll/hltv-rust
A client to fetch and parse data from HLTV.org
https://github.com/dist1ll/hltv-rust
api crawler hltv parser rust
Last synced: 22 days ago
JSON representation
A client to fetch and parse data from HLTV.org
- Host: GitHub
- URL: https://github.com/dist1ll/hltv-rust
- Owner: dist1ll
- License: apache-2.0
- Created: 2022-01-18T01:01:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-30T18:41:55.000Z (almost 2 years ago)
- Last Synced: 2024-10-06T08:36:21.749Z (about 1 month ago)
- Topics: api, crawler, hltv, parser, rust
- Language: Rust
- Homepage: https://docs.rs/hltv/latest/hltv/
- Size: 102 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# HLTV client
[Documentation](https://docs.rs/hltv/latest/hltv/) | [Crates.io](https://crates.io/crates/hltv) | [Repository](https://foss.alic.dev/dist1ll/hltv-rust)
**A crate for fetching and parsing esports data from [HLTV.org](https://www.hltv.org).**
This crate allows you to fetch and parse upcoming matches, results,
event information, player performance. This crate uses async calls via `reqwest`
and parses the HTML document with `tl`. This API mimics the way you discover information on HLTV.
Summary pages like [HLTV Matches](https://www.hltv.org/matches) contain less information
in the HTML document than the detailed match-specific page.Currently, the following API calls are supported:
- `crate::upcoming`
- `crate::results`
- `crate::get_match`## Examples
The builders in `hltv` allow you to build a generic `Request` object with a `Request::fetch` method.
```rust
#[tokio::test]
async fn results() -> Result<(), Box> {
let req = hltv::results()
.map(Map::Inferno)
.team(4608) // Team Na'Vi
.year(2016)
.event_type(EventTypeFilter::Lan)
.build();let matches = req.fetch().await?; // Vec
Ok(())
}
```
## Getting more detailed information## License
This project is dual-licensed under the MIT and Apache 2.0 license.