mirror of
https://github.com/danbulant/robotparser-rs
synced 2026-06-16 13:11:04 +00:00
Update README.md
This commit is contained in:
parent
cbe515e761
commit
179d6e5f87
1 changed files with 38 additions and 0 deletions
38
README.md
38
README.md
|
|
@ -1,2 +1,40 @@
|
|||
# robotparser-rs
|
||||
|
||||
[](https://travis-ci.org/messense/robotparser-rs)
|
||||
[](https://ci.appveyor.com/project/messense/robotparser-rs/branch/master)
|
||||
[](https://coveralls.io/r/messense/robotparser-rs)
|
||||
[](https://crates.io/crates/robotparser)
|
||||
|
||||
robots.txt parser for Rust.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Add it to your ``Cargo.toml``:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
robotparser = "*"
|
||||
```
|
||||
|
||||
Add ``extern crate robotparser`` to your crate root and your're good to go!
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
```rust
|
||||
extern crate robotparser;
|
||||
|
||||
use robotparser::RobotFileParser;
|
||||
|
||||
fn main() {
|
||||
let parser = RobotFileParser::new("http://www.python.org/robots.txt");
|
||||
parser.read();
|
||||
assert!(parser.can_fetch("*", "http://www.python.org/robots.txt"));
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.
|
||||
|
|
|
|||
Loading…
Reference in a new issue