We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69459b3 commit 76e6020Copy full SHA for 76e6020
1 file changed
web_programming/covid_stats_via_xpath.py
@@ -33,8 +33,7 @@ def covid_stats(
33
) -> CovidData:
34
xpath_str = '//div[@class = "maincounter-number"]/span/text()'
35
try:
36
- response = httpx.get(url, timeout=10)
37
- response.raise_for_status()
+ response = httpx.get(url, timeout=10).raise_for_status()
38
except httpx.TimeoutException:
39
print(
40
"Request timed out. Please check your network connection "
0 commit comments