Skip to content

Commit 9160f57

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fe15df3 commit 9160f57

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_programming/covid_stats_via_xpath.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class CovidData(NamedTuple):
2424
recovered: str
2525

2626

27-
def covid_stats(url: str = "https://web.archive.org/web/20250825095350/https://www.worldometers.info/coronavirus/") -> CovidData:
27+
def covid_stats(
28+
url: str = "https://web.archive.org/web/20250825095350/https://www.worldometers.info/coronavirus/",
29+
) -> CovidData:
2830
xpath_str = '//div[@class = "maincounter-number"]/span/text()'
2931
return CovidData(
3032
*html.fromstring(httpx.get(url, timeout=10).content).xpath(xpath_str)

0 commit comments

Comments
 (0)