Skip to content

Commit

Permalink
feat(cpex): add standalone scraper (nusmodifications#3622)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgzf authored and alissayarmantho committed Oct 14, 2023
1 parent 01df47b commit 576cdc4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scrapers/cpex-scraper/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import path from 'path';

import env from '../env.json';

<<<<<<< HEAD
const TERM = '2320';
=======
// Configure this!
const term = '2310';
>>>>>>> 23919f73 (feat(cpex): add standalone scraper (#3622))

// Sanity check to see if there are at least this many modules before overwriting cpexModules.json
// The last time I ran this fully there were 3418 modules
Expand Down Expand Up @@ -93,7 +98,11 @@ async function scraper() {

const getModulesResponse = await axios.post<ApiResponse<Module[]>>(`${baseUrl}/module`, {
acadorg: department.AcademicOrganisation,
<<<<<<< HEAD
term: TERM,
=======
term,
>>>>>>> 23919f73 (feat(cpex): add standalone scraper (#3622))
});

if (getModulesResponse.data.code !== FETCH_OK) {
Expand Down

0 comments on commit 576cdc4

Please sign in to comment.