utkarshkukreti / select.rs

A Rust library to extract useful data from HTML documents, suitable for web scraping.
MIT License
959 stars 69 forks source link

Is there a way to get the Node's text, converting <br> into newlines? #51

Open dawid2193487 opened 6 years ago

dawid2193487 commented 6 years ago

Right now when I just try .text() on a node I get it's text but it lacks newlines where would be line breaks. Is there a way to add them? Currently I could take .html(), then strip it out of all tags but
manually, then swap them out for \n, but I think there should be a built in way.