أمثلة
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" | تدعم تسلسلات الإفلات مثل \n و\r و\t |