diff options
| author | Joe Mou <dev@mou.fo> | 2026-07-15 00:21:11 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-07-15 00:43:33 -0400 |
| commit | 47ddd107c2f19a977798b8af230c652ba731cf45 (patch) | |
| tree | f4a468234875d42f11c53c62e0abed33dc8a0dda /cgithub | |
| parent | c07865241ce113cbb26a939fd43fdf3461092c94 (diff) | |
Remove watchers, no longer rendered by GitHub
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'cgithub')
| -rw-r--r-- | cgithub/src/scraper.test.ts | 1 | ||||
| -rw-r--r-- | cgithub/src/scraper.ts | 5 | ||||
| -rw-r--r-- | cgithub/views/repo.eta | 3 |
3 files changed, 0 insertions, 9 deletions
diff --git a/cgithub/src/scraper.test.ts b/cgithub/src/scraper.test.ts index 4a01853..2438361 100644 --- a/cgithub/src/scraper.test.ts +++ b/cgithub/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/cgithub/src/scraper.ts b/cgithub/src/scraper.ts index a44f0a7..3434434 100644 --- a/cgithub/src/scraper.ts +++ b/cgithub/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/cgithub/views/repo.eta b/cgithub/views/repo.eta index 6204b69..683a9ad 100644 --- a/cgithub/views/repo.eta +++ b/cgithub/views/repo.eta @@ -11,9 +11,6 @@ <% if (it.info.stars) { %> <span class="detail"><img src="/static/icons/star.svg" alt="stars" class="icon"> <%= it.info.stars %></span> <% } %> - <% if (it.info.watchers) { %> - <span class="detail"><img src="/static/icons/eye.svg" alt="watchers" class="icon"> <%= it.info.watchers %></span> - <% } %> <% if (it.info.forks) { %> <span class="detail"><img src="/static/icons/git-fork.svg" alt="forks" class="icon"> <%= it.info.forks %></span> <% } %> |
