Skip to content

Commit 12f3a0e

Browse files
minor selector fix
1 parent ef36897 commit 12f3a0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/reading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,15 +1246,15 @@ print only the first 5 elements for clarity.
12461246

12471247
```{code-cell} ipython3
12481248
population_nodes = page.select(
1249-
"td:nth-child(8) , td:nth-child(6) , td:nth-child(4) , .mw-parser-output div td:nth-child(2)"
1249+
"td:nth-child(8) , td:nth-child(4) , .largestCities-cell-background+ td a"
12501250
)
12511251
population_nodes[:5]
12521252
```
12531253

12541254
Each of the items in the `population_nodes` list is a *node* from the HTML document that matches the CSS
12551255
selectors you specified. A *node* is an HTML tag pair (e.g., `<td>` and `</td>`
12561256
which defines the cell of a table) combined with the content stored between the
1257-
tags. For our CSS selector `td:nth-child(6)`, an example node that would be
1257+
tags. For our CSS selector `td:nth-child(4)`, an example node that would be
12581258
selected would be:
12591259

12601260
```html

0 commit comments

Comments
 (0)