2020-05-11 19:21:57 +00:00
|
|
|
pub mod price_result;
|
|
|
|
pub mod parser;
|
|
|
|
pub mod price_checker;
|
|
|
|
|
|
|
|
extern crate reqwest;
|
|
|
|
extern crate scraper;
|
|
|
|
use price_result::PriceResult;
|
|
|
|
use price_checker::PriceChecker;
|
|
|
|
|
2020-05-11 18:32:43 +00:00
|
|
|
fn main() {
|
2020-05-11 19:21:57 +00:00
|
|
|
let price_checker = PriceChecker::new();
|
|
|
|
|
|
|
|
let price_result = price_checker.get_price("https://www.darty.com/nav/achat/gros_electromenager/refrigerateur-congelateur-refrigerateur-cong/refrigerateur-congelateur_bas/samsung_rb33n300nsa_ef.html");
|
|
|
|
println!("Product «{}: {}» price {}€", price_result.product, price_result.name, price_result.price);
|
2020-05-11 18:32:43 +00:00
|
|
|
}
|
2020-05-11 19:21:57 +00:00
|
|
|
|