From bb20fa37c080350df6348fdebcede32f90ea5377 Mon Sep 17 00:00:00 2001 From: krishoang <74447462+krishoang222@users.noreply.github.com> Date: Sat, 7 Mar 2026 18:02:51 +0700 Subject: [PATCH] docs: doc should mention JS instead of python Updated references from Python to JavaScript in the scraping basics documentation and modified the parsing library from Beautiful Soup to Cheerio. --- .../07_extracting_data.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/sources/academy/webscraping/scraping_basics_javascript/07_extracting_data.md b/sources/academy/webscraping/scraping_basics_javascript/07_extracting_data.md index 74b440b4bc..00cdf643b4 100644 --- a/sources/academy/webscraping/scraping_basics_javascript/07_extracting_data.md +++ b/sources/academy/webscraping/scraping_basics_javascript/07_extracting_data.md @@ -27,7 +27,7 @@ Sony XBR-950G BRAVIA 4K HDR Ultra HD TV | From $1,398.00 ... ``` -Let's summarize what stands in our way if we want to have it in our Python program as a number: +Let's summarize what stands in our way if we want to have it in our JavaScript program as a number: - A dollar sign precedes the number, - the number contains decimal commas for better human readability, and @@ -244,13 +244,6 @@ Denon AH-C720 In-Ear Headphones | 236
Solution {WarehouseUnitsExercise.code} - - :::tip Conditional (ternary) operator - - For brevity, the solution uses the [conditional (ternary) operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_operator). You can achieve the same with a plain `if` and `else` block. - - ::: -
### Use regular expressions @@ -260,18 +253,11 @@ Simplify the code from previous exercise. Use [regular expressions](https://deve
Solution {WarehouseUnitsRegexExercise.code} - - :::tip Conditional (ternary) operator - - For brevity, the solution uses the [conditional (ternary) operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_operator). You can achieve the same with a plain `if` and `else` block. - - ::: -
### Scrape publish dates of F1 news -Download Guardian's page with the latest F1 news and use Beautiful Soup to parse it. Print titles and publish dates of all the listed articles. This is the URL: +Download Guardian's page with the latest F1 news and use Cheerio to parse it. Print titles and publish dates of all the listed articles. This is the URL: ```text https://www.theguardian.com/sport/formulaone