Skip to content

Commit 0e73449

Browse files
m-aciekhugovk
andcommitted
Display directly visitors number
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 474f0d4 commit 0e73449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

visitors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def get_number_of_visitors(language: str) -> str:
1212
r = requests.get(f'https://plausible.io/docs.python.org/export?{param}', timeout=10)
1313
with zipfile.ZipFile(io.BytesIO(r.content), 'r') as z, z.open('visitors.csv') as csv_file:
1414
csv_reader = csv.DictReader(io.TextIOWrapper(csv_file))
15-
return humanize.intword(sum(int(row["visitors"]) for row in csv_reader))
15+
return f"{sum(int(row["visitors"]) for row in csv_reader):,}"

0 commit comments

Comments
 (0)