From 1944eb6e5d09093b749705e5814956cf7ed21510 Mon Sep 17 00:00:00 2001 From: Shreyas Minocha Date: Sat, 22 Oct 2022 18:33:35 -0500 Subject: [PATCH] Update menu file location --- src/scrape.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scrape.js b/src/scrape.js index 419dfe1..a7d4847 100644 --- a/src/scrape.js +++ b/src/scrape.js @@ -5,11 +5,11 @@ import pageify from './pageify.js'; import mealToData from './meal-to-data.js'; const api = got.extend({ - prefixUrl: 'https://web-api3.rice.edu', + prefixUrl: 'https://staticws.b-cdn.net', }); async function getDailyMenu(servery) { - const res = await api.get(`static/${servery}-menu-new.js`); + const res = await api.get(`dining/${servery}-menu-new.js`); const menuHtml = eval(res.body + `${camelcase(servery)}MenuTemplate()`); // eval bad const dom = new jsdom.JSDOM(pageify(menuHtml)); const mealsDom = dom.window.document.querySelectorAll('.inside-daily-menu .item:not(.legend)'); @@ -18,7 +18,7 @@ async function getDailyMenu(servery) { } async function getFullWeekMenu(servery) { - const res = await api.get(`static/${servery}-menu-full-week-new.js`); + const res = await api.get(`dining/${servery}-menu-full-week-new.js`); const menuHtml = eval(res.body + `${camelcase(servery)}MenuFullWeekTemplate()`); const dom = new jsdom.JSDOM(pageify(menuHtml)); const mealsDom = dom.window.document.querySelectorAll('.weekly-menu .item:not(.legend)'); -- 2.45.2