mirror of
https://github.com/danbulant/robotparser-rs
synced 2026-06-18 22:21:05 +00:00
Update reqwest to 0.8
This commit is contained in:
parent
832eb63e36
commit
79471efcc2
2 changed files with 3 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ version = "0.9.0"
|
|||
url = "1.2"
|
||||
|
||||
[dependencies.reqwest]
|
||||
version = "0.7"
|
||||
version = "0.8"
|
||||
optional = true
|
||||
|
||||
[dependencies.clippy]
|
||||
|
|
|
|||
|
|
@ -254,8 +254,8 @@ impl<'a> RobotFileParser<'a> {
|
|||
#[cfg(feature = "http")]
|
||||
/// Reads the robots.txt URL and feeds it to the parser.
|
||||
pub fn read(&self) {
|
||||
let client = Client::new().expect("client failed to construct");
|
||||
let mut request = client.get(self.url.clone()).expect("Invalid URL");
|
||||
let client = Client::new();
|
||||
let mut request = client.get(self.url.clone());
|
||||
let request = request.header(UserAgent::new(USER_AGENT.to_owned()));
|
||||
let mut res = match request.send() {
|
||||
Ok(res) => res,
|
||||
|
|
|
|||
Loading…
Reference in a new issue