Skip to content

Commit

Permalink
chore(crawl): fix field type (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez authored Feb 12, 2022
1 parent a6f97d3 commit 730fb12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spider"
version = "1.3.0"
version = "1.3.1"
authors = ["madeindjs <contact@rousseau-alexandre.fr>"]
description = "Multithreaded Web spider crawler written in Rust."
repository = "https://github.com/madeindjs/spider"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Add this dependency to your _Cargo.toml_ file.

```toml
[dependencies]
spider = "1.2.2"
spider = "1.3.1"
```

Then you'll be able to use library. Here is a simple example:
Expand Down Expand Up @@ -55,7 +55,7 @@ website.configuration.verbose = true; // Defaults to false
website.configuration.delay = 2000; // Defaults to 250 ms
website.configuration.concurrency = 10; // Defaults to 4
website.configuration.user_agent = "myapp/version"; // Defaults to spider/x.y.z, where x.y.z is the library version
website.on_link_find_callback = |s| { println!("link target: {}", s); s } // Callback to run on each link find
website.on_link_find_callback = |s| { println!("link target: {}", s); s }; // Callback to run on each link find

website.crawl();
```
Expand Down
2 changes: 1 addition & 1 deletion src/website.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Website<'a> {
/// contains page visited
pages: Vec<Page>,
/// callback when a link is found
on_link_find_callback: fn(String) -> String,
pub on_link_find_callback: fn(String) -> String,
/// Robot.txt parser holder
robot_file_parser: RobotFileParser<'a>,
}
Expand Down

0 comments on commit 730fb12

Please sign in to comment.