The site I’m monitoring has a lot of rows containing images but I only want to filter out the ones that don’t have them. Is there any way to do this? Thanks for your attention!!
@tinkin it should be possible to select all rows that contain the images. one way of doing that is by using :has()
(a css pseudo-class).
here’s an example of using the :has()
to select only those rows that contain an image (img tag):
<table><tbody>
<tr><td>some text</td></tr>
<tr><td>with image 1 <img src/> </td></tr>
<tr><td>with image 2 <img src/> </td></tr>
<tr><td>another text</td></tr>
</table></tbody>
selector:
tr:has(img)
tr:has(img)
will match only the table rows (<tr>
) that contain an <img>
tag, ignoring rows that do not have an image.