Skip to content

Commit b4e6d53

Browse files
committed
make linters happy
1 parent 28be7a5 commit b4e6d53

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

sources/academy/webscraping/scraping_basics_javascript/exercises/eurozone_population.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ function parsePopulation($) {
1414
const text = $(element).text();
1515
if (text.includes('Population')) {
1616
const digits = text
17-
.replace("Population:", "")
18-
.replaceAll(" ", "");
17+
.replace('Population:', '')
18+
.replaceAll(' ', '');
1919
return Number.parseInt(digits, 10);
2020
}
2121
}
22+
throw new Error('Population not found');
2223
}
2324

2425
const listingUrl = 'https://european-union.europa.eu/institutions-law-budget/euro/countries-using-euro_en';

sources/academy/webscraping/scraping_basics_python/exercises/eurozone_population.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def parse_population(country_soup: BeautifulSoup) -> int | None:
1414
if "Population" in item.text:
1515
digits = item.text.replace("Population:", "").replace(" ", "")
1616
return int(digits)
17+
raise ValueError("Population not found")
1718

1819

1920
listing_url = "https://european-union.europa.eu/institutions-law-budget/euro/countries-using-euro_en"

0 commit comments

Comments
 (0)