| Expressão | Descrição |
|---|---|
/ |
Dá o nó raiz |
// |
Dá todos os nós |
. |
Dá o nó atual |
.. |
Dá o nó pai |
@ |
Dá atributos |
[n] |
Dá o enésimo elemento |
[last()] |
Dá o último elemento |
[last()-n] |
Dá o enésimo elemento do último |
[position()<n] |
Dá os primeiros n elementos |
[x>n] |
Dá todos os elementos x contendo um elemento maior que n |
$x('/html')[<html>...</html>]$x('/html/body')[<body>...</body>]$x('/html/body/div')[<div>...</div>]$x('/html/body/div/h1')[<h1>Example Domain</h1>]$x('/html/body/div/p')[<p>...</p>,<p>...</p>]$x('/html/body/div/p[1]')[<p>...</p>]$x('/html/body/div/p[2]')[<p>...</p>]
$x('//html/head/title')[<title>Example Domain</title>]
$x('//p')[<p>...</p>,<p>...</p>]$x('//a')[<ahref="http://www.iana.org/domains/example">More information...</a>]
$x('//div//a')[<ahref="http://www.iana.org/domains/example">More information...</a>]$x('//div/a')[ ]
$x('//a/text()')[ "More information..." ]
$x('//div/*')[<h1>Example Domain</h1>,<p>...</p>,<p>...</p>]
$x('//a[@href]')[<ahref="http://www.iana.org/domains/example">More information...</a>]$x('//a[@href="http://www.iana.org/domains/example"]')[<ahref="http://www.iana.org/domains/example">More information...</a>]$x('//a[contains(@href, "iana")]')[<ahref="http://www.iana.org/domains/example">More information...</a>]$x('//a[starts-with(@href, "http://www.")]')[<ahref="http://www.iana.org/domains/example">More information...</a>]$x('//a[not(contains(@href, "abc"))]')[<ahref="http://www.iana.org/domains/example">More information...</a>]
response.xpath('/html').extract()[u'<html><head><title>...</body></html>']response.xpath('/html/body/div/h1').extract()[u'<h1>Example Domain</h1>']response.xpath('/html/body/div/p').extract()[u'<p>This domain ... permission.</p>', u'<p><ahref="http://www.iana.org/domains/example">More information...</a></p>']response.xpath('//html/head/title').extract()[u'<title>Example Domain</title>']response.xpath('//a').extract()[u'<ahref="http://www.iana.org/domains/example">More information...</a>']response.xpath('//a/@href').extract()[u'http://www.iana.org/domains/example']response.xpath('//a/text()').extract()[u'More information...']response.xpath('//a[starts-with(@href, "http://www.")]').extract()[u'<ahref="http://www.iana.org/domains/example">More information...</a>']
Obtendo expressôes XPath do Chrome
- Clicar com o botao direito no elemento –> inspecionar elemento
- clique com o botao direito no inspetor –> copy –> copy Xpath
Este artigo foi útil ?
SimNão
Last modified: 14 de setembro de 2019

888win13, eh? Gave it a look-see. A pretty solid site to play. Give it a whril if you wanna see 888win13.
Downloaded the 29betapp recently and it’s pretty smooth. Easy to navigate, and I haven’t had any glitches so far. Definitely beats using the website on my phone all the time. Check it out here: 29betapp
Paldo77 is legit! Found some games I actually enjoy there. The experience is pretty good. Check it out and see if you like it! paldo77
Geelyslots is a nice option for a quick spin. Nothing fancy, but reliable and fun. If you’re a slots fan, give it a go. Quick and easy. Spin away at geelyslots
Heard OK9Casino’s pretty rad, eh? Gonna check it out for some cheeky spins later. Hopefully, lady luck’s on my side! Check them out yourself at ok9casino.
Yo, Fun88app looks interesting! Been hearing some talk about it. Anyone used it before? Seems like a good place to visit if you are looking for such entertainments: fun88app.
Just tried Sprunki 88 and wow, the vibes are immaculate! The music slaps hard, but is anyone else finding the combo system a bit sus? Still, it’s a chill way to unwind after work.
As a long-time player, I appreciate how polished the combat mechanics are in this update. The hit registration feels crisp, and the new maps add great replay value. Definitely worth the hype!
As someone who’s played every version, this iteration nails the balance between chaos and strategy. The new character abilities add fresh layers to the meta, and the physics improvements make combat feel more responsive. GG to the team!
Straight to the point, I like it! go123casinologin does exactly what it says on the tin. Nice and speedy login process. Saves time, gets you playing faster. That’s a win in my book! Login at go123casinologin!
88zh88 Game Download has a great selection of games! The download was straightforward and the game quality is excellent. Check it out and join some good times: 88zh88gamedownload
Golo789 is the real deal! Been playing on it for a while now and I’m loving the variety of games. It’s my current obsession and it could be yours as well! Click on the link below to give it a try! golo789