@@ 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)');