Derive Macro crabler_derive::WebScraper [−][src]
#[derive(WebScraper)]
{
// Attributes available to this derive:
#[on_html]
#[on_page]
#[on_response]
}
Expand description
Macro to derive WebScraper trait on to a given struct. Supported options:
#[on_page(method_name)]
- will bind given method to a successful page load with the contents of the page#[on_html("css selector", method_name)]
- will bind given css selector to a method. When page is loaded this method will be invoked for all elements that match given selector.#[on_response(method_name)]
- will bind given method to an HTTP response