Exemples
Select a release download link by its class
The result contains the matching element, including its attributes.
Entrée
<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>- Sélecteur CSS
a.download- Délimiteur
\n
Select only failed rows from a job report
Entrée
<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>- Sélecteur CSS
tr.failed- Délimiteur
\n
Select links whose destination uses HTTPS
Entrée
<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>- Sélecteur CSS
a[href^="https://"]- Délimiteur
\n
Select direct list children without nested checklist items
Entrée
<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>- Sélecteur CSS
#steps > li- Délimiteur
|
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.
Entrée
<html><head><title>Release notes</title></head><body>v2</body></html>Expected answer
Empty result- Sélecteur CSS
link[rel="canonical"]- Délimiteur
\n
CSS selector
Entrée
<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>- Sélecteur CSS
#test p.a- Délimiteur
\n
Paramètres
| Paramètre | Valeur par défaut | Entrée et choix |
|---|---|---|
| Sélecteur CSS | "" | Texte |
| Délimiteur | "\\n" | Les séquences d’échappement comme \n, \r et \t sont acceptées |