Примеры
Select a release download link by its class
The result contains the matching element, including its attributes.
Ввод
<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>- CSS-селектор
a.download- Разделитель
\n
Select only failed rows from a job report
Ввод
<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>- CSS-селектор
tr.failed- Разделитель
\n
Select links whose destination uses HTTPS
Ввод
<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>- CSS-селектор
a[href^="https://"]- Разделитель
\n
Select direct list children without nested checklist items
Ввод
<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>- CSS-селектор
#steps > li- Разделитель
|
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.
Ввод
<html><head><title>Release notes</title></head><body>v2</body></html>Expected answer
Empty result- CSS-селектор
link[rel="canonical"]- Разделитель
\n
CSS selector
Ввод
<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>- CSS-селектор
#test p.a- Разделитель
\n
Параметры
| Параметр | Значение по умолчанию | Ввод и варианты |
|---|---|---|
| CSS-селектор | "" | Текст |
| Разделитель | "\\n" | Поддерживаются escape-последовательности \n, \r и \t |