From d0dccc7a910a579d8c172c3d5a5a02ea3abd964d Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Thu, 22 Jan 2026 13:27:36 -0500 Subject: Simple web server for viewing trees --- cgithub/github-scraper.js | 74 ----------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100755 cgithub/github-scraper.js (limited to 'cgithub/github-scraper.js') diff --git a/cgithub/github-scraper.js b/cgithub/github-scraper.js deleted file mode 100755 index 7e07adc..0000000 --- a/cgithub/github-scraper.js +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env node -/** - * GitHub Directory Listing Scraper - * - * Gets directory listings from GitHub without using the API (no rate limits!) - * Works by parsing the server-rendered HTML that GitHub sends to browsers. - */ - -async function getGitHubDirectory(owner, repo, path = '') { - // Always use the tree URL pattern, even for root directory - const url = `https://github.com/${owner}/${repo}/tree/main/${path}`; - - console.error(`Fetching: ${url}`); - - const response = await fetch(url); - const html = await response.text(); - - // GitHub embeds the directory data in a JSON script tag - // Using the tree (subdirectory) pattern for all cases - const subdirMatch = html.match(/