Skip to content

Commit

Permalink
fix: Properly remove the second comma from user counts over 1,000,000
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Dec 7, 2024
1 parent f800177 commit b43d9af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/crawlers/chrome-crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ export async function crawlExtension(
userCountRow
.querySelectorAll("a")
.forEach((anchor: HTMLAnchorElement) => anchor.remove());
console.log(userCountRow.textContent);
const weeklyActiveUsers = (userCountRow.textContent as string)
// "XYZ+ users"
.replace(" users", "")
.replace(",", "")
.replaceAll(",", "")
.replace("+", "")
.trim();
console.log(weeklyActiveUsers);

// ratingRow.outerHTML:
// <span>
Expand Down

0 comments on commit b43d9af

Please sign in to comment.