causal-agent / scraper

HTML parsing and querying with CSS selectors
https://docs.rs/scraper
ISC License
1.79k stars 98 forks source link

Make some minor improvements to the code base #140

Closed adamreichold closed 11 months ago

adamreichold commented 11 months ago

Our code base is littered with calls to element.value().attr("attribute") and this little method would make this much more readable by shorting it to element.attr("attribute").

Generally, I would also consider impl Deref<Target=Element> instead of impl Deref<Target=NodeRef> but that would be incompatible and more intrusive.

cfvescovo commented 11 months ago

LGTM