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

Add support for text matching #59

Closed valkum closed 3 months ago

valkum commented 5 years ago

This PR adds support for matching text.

Usecase

Find the correct table to iteratore over cells on websites without attributes.

e.g.

<html><body>
<table><tr><td>First Table<td><tr><tr><td>..</td></tr></table>
<table><tr><td>Second Table<td><tr><tr><td>important cell</td></tr></table>
...
</body></html>

Before you would need to rely on the nth table child of body but that breaks if the order changes.