diff options
| author | Yuren Hao <97327730+YurenHao0426@users.noreply.github.com> | 2025-08-06 02:00:55 -0700 |
|---|---|---|
| committer | Yuren Hao <97327730+YurenHao0426@users.noreply.github.com> | 2025-08-06 02:00:55 -0700 |
| commit | caa18e81e8eb03fb03a82d0d3526994c9ba41ac2 (patch) | |
| tree | aa89a6d2998ecfc60254e17fd0d3cdb5449a8248 | |
| parent | 343978870774f81ecaa06d7f253020265f601fd2 (diff) | |
fix: force IPv4 for scrapercodex/test-uiuc-api-cors-response
| -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 }); |
