Skip to content

Commit c2c6d15

Browse files
Peter Bronezkmike
authored andcommitted
Converted sel.xpath() calls to response.xpath() in Extracting the data
1 parent 19bb4d3 commit c2c6d15

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/intro/tutorial.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,19 +315,19 @@ is inside a ``<ul>`` element, in fact the *second* ``<ul>`` element.
315315
So we can select each ``<li>`` element belonging to the sites list with this
316316
code::
317317

318-
sel.xpath('//ul/li')
318+
response.xpath('//ul/li')
319319

320320
And from them, the sites descriptions::
321321

322-
sel.xpath('//ul/li/text()').extract()
322+
response.xpath('//ul/li/text()').extract()
323323

324324
The sites titles::
325325

326-
sel.xpath('//ul/li/a/text()').extract()
326+
response.xpath('//ul/li/a/text()').extract()
327327

328328
And the sites links::
329329

330-
sel.xpath('//ul/li/a/@href').extract()
330+
response.xpath('//ul/li/a/@href').extract()
331331

332332
As we've said before, each ``.xpath()`` call returns a list of selectors, so we can
333333
concatenate further ``.xpath()`` calls to dig deeper into a node. We are going to use

0 commit comments

Comments
 (0)