From 18db9dae971a0681c8537d94092cd68fe8f65fa5 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Wed, 15 Jul 2026 00:21:11 -0400 Subject: Remove watchers, no longer rendered by GitHub Co-Authored-By: Claude Fable 5 --- src/scraper.test.ts | 1 - src/scraper.ts | 5 ----- views/repo.eta | 3 --- 3 files changed, 9 deletions(-) diff --git a/src/scraper.test.ts b/src/scraper.test.ts index 4a01853..2438361 100644 --- a/src/scraper.test.ts +++ b/src/scraper.test.ts @@ -30,7 +30,6 @@ describe("GitHub scraper", () => { ); assert.strictEqual(data.info.website, "https://pages.github.com"); assert.strictEqual(data.info.stars?.length, 3); - assert.strictEqual(data.info.watchers?.length, 2); assert.strictEqual(data.info.forks?.length, 3); assert.strictEqual(data.info.numReleases, 38); assert.strictEqual(data.info.latestReleaseTag, "v5.0.0"); diff --git a/src/scraper.ts b/src/scraper.ts index a44f0a7..3434434 100644 --- a/src/scraper.ts +++ b/src/scraper.ts @@ -227,7 +227,6 @@ export interface RepoInfo { description: string | null; website: string | null; stars: string | null; - watchers: string | null; forks: string | null; numReleases?: number; latestReleaseTag?: string; @@ -386,9 +385,6 @@ function parseRepoInfo(html: string): RepoInfo { ? getAttributeValue(starsElem, "title") || textContent(starsElem).trim() : null; - const watchersElem = cssSelect.selectOne("a[href$='/watchers'] strong", document); - const watchers = watchersElem ? textContent(watchersElem).trim() : null; - const forksElem = cssSelect.selectOne("#repo-network-counter", document) as Element | null; const forks = forksElem ? getAttributeValue(forksElem, "title") || textContent(forksElem).trim() @@ -428,7 +424,6 @@ function parseRepoInfo(html: string): RepoInfo { description, website, stars, - watchers, forks, numReleases, latestReleaseTag, diff --git a/views/repo.eta b/views/repo.eta index 6204b69..683a9ad 100644 --- a/views/repo.eta +++ b/views/repo.eta @@ -11,9 +11,6 @@ <% if (it.info.stars) { %> stars <%= it.info.stars %> <% } %> - <% if (it.info.watchers) { %> - watchers <%= it.info.watchers %> - <% } %> <% if (it.info.forks) { %> forks <%= it.info.forks %> <% } %> -- cgit v1.3.1