diff options
| -rw-r--r-- | .github/workflows/update-and-deploy.yml | 2 | ||||
| -rw-r--r-- | package.json | 3 | ||||
| -rw-r--r-- | scripts/scrape.js | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/update-and-deploy.yml b/.github/workflows/update-and-deploy.yml index 0e29cad..fb034a6 100644 --- a/.github/workflows/update-and-deploy.yml +++ b/.github/workflows/update-and-deploy.yml @@ -16,6 +16,8 @@ jobs: node-version: 18 - run: npm ci - name: Scrape UIUC catalog + env: + NODE_OPTIONS: --dns-result-order=ipv4first run: npm run scrape - name: Commit data run: | diff --git a/package.json b/package.json index 1b03247..4844bba 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dev": "vite", "build": "tsc --noEmit && vite build", "preview": "vite preview", - "scrape": "node scripts/scrape.js 2025 fall" + "scrape": "node scripts/scrape.js 2025 fall", + "test": "echo \"(no tests yet)\"" }, "dependencies": { "cytoscape": "^3.28.0", diff --git a/scripts/scrape.js b/scripts/scrape.js index 0de8bb3..2bfca5e 100644 --- a/scripts/scrape.js +++ b/scripts/scrape.js @@ -1,6 +1,9 @@ import { XMLParser } from "fast-xml-parser"; import fs from "fs/promises"; import path from "path"; +import dns from "node:dns"; + +dns.setDefaultResultOrder("ipv4first"); const [ , , YEAR = "2025", TERM = "fall" ] = process.argv; const parser = new XMLParser({ ignoreAttributes: false }); |
