Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(crawl): fix field type #14

Merged
merged 1 commit into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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