use scraper::*;
use scraper::html::{*, Html};
- pub trait HtmlExt {
- fn select<'a,'b>(&'a self, selector: &'b Selector) -> Select<'a, 'b>;
+ #[ext(pub)]
+ impl Html {
+ fn select<'a,'b>(&'a self, selector: &'b Selector) -> Select<'a, 'b> {
+ self.select(selector)
+ }
#[throws(as Option)]
fn element<S>(&self, sel: S) -> ElementRef
}
}
- impl HtmlExt for Html {
- fn select<'a,'b>(&'a self, selector: &'b Selector) -> Select<'a, 'b> {
- self.select(selector)
- }
- }
-
#[throws(AE)]
pub fn parse_html(resp: reqwest::blocking::Response) -> Html {
assert_eq!(resp.status(), 200);
pub use either::{Either, Left, Right};
pub use enum_dispatch::enum_dispatch;
pub use enum_map::{Enum, EnumMap};
+pub use extend::ext;
pub use fehler::{throw, throws};
pub use flexi_logger::LogSpecification;
pub use fs2::FileExt;