From 4bbc0c19076dc8490c451a1f535f3e018fb8dda3 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 --- github-scraper.js | 74 ------------------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100755 github-scraper.js (limited to 'github-scraper.js') diff --git a/github-scraper.js b/github-scraper.js deleted file mode 100755 index 7e07adc..0000000 --- a/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(/