Exemplos
Select a release download link by its class
The result contains the matching element, including its attributes.
Entrada
<main><a class="download" href="/app.tar.gz">Linux</a><a href="/notes">Notes</a></main>Expected answer
<a class="download" href="/app.tar.gz">Linux</a>- Seletor CSS
a.download- Delimitador
\n
Select only failed rows from a job report
Entrada
<table><tr class="passed"><td>Build</td></tr><tr class="failed"><td>Test</td></tr></table>Expected answer
<tr class="failed"><td>Test</td></tr>- Seletor CSS
tr.failed- Delimitador
\n
Select links whose destination uses HTTPS
Entrada
<div><a href="https://example.org/docs">Docs</a><a href="/local">Local</a></div>Expected answer
<a href="https://example.org/docs">Docs</a>- Seletor CSS
a[href^="https://"]- Delimitador
\n
Select direct list children without nested checklist items
Entrada
<ul id="steps"><li>Build<ul><li>Compile</li></ul></li><li>Deploy</li></ul>Expected answer
<li>Build<ul><li>Compile</li></ul></li> | <li>Deploy</li>- Seletor CSS
#steps > li- Delimitador
|
Find a missing canonical link in a document head
An empty result means no matching element was found in this supplied HTML; no website is fetched.
Entrada
<html><head><title>Release notes</title></head><body>v2</body></html>Expected answer
Empty result- Seletor CSS
link[rel="canonical"]- Delimitador
\n
CSS selector
Entrada
<div id="test">
<p class="a">hello</p>
<p>world</p>
<p class="a">again</p>
</div>Expected answer
<p class="a">hello</p>
<p class="a">again</p>- Seletor CSS
#test p.a- Delimitador
\n
Parâmetros
| Parâmetro | Valor padrão | Entrada e opções |
|---|---|---|
| Seletor CSS | "" | Texto |
| Delimitador | "\\n" | Sequências de escape como \n, \r e \t são aceitas |