Skip to content

Commit

Permalink
Update docs/introduction/06-scraping.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
mnmkng committed May 16, 2023
1 parent 7db7ca8 commit 5614549
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/introduction/06-scraping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const runCountString = await runsRow.textContent();
const runCount = runCountString.replace('Runs ', '');
```

The code looks complicated, but it only reads that we're looking for an `<ul class="ActorHeader-userMedallion ...">` element and within that element we're looking for the `<li>` element that includes the text **Runs**. We're only interested in the number of runs. So we extract the number from the last (second) `<li>` element. But it contains the "Runs " string as well, so we remove the "Runs " by replacing the word with empty strings.
The code looks complicated, but it only reads that we're looking for an `<ul class="ActorHeader-userMedallion ...">` element and within that element we're looking for the `<li>` element that includes the text **Runs**. We're only interested in the number of runs. So we extract the number from the last (second) `<li>` element. But it contains the "Runs " string as well, so we remove the "Runs " by replacing the word with empty string.

And there we have it! All the data we needed. For the sake of completeness, let's add all the properties together, and we're good to go.

Expand Down

0 comments on commit 5614549

Please sign in to comment.