Skip to content
Andy Braren edited this page Jan 31, 2015 · 6 revisions

General Approach

Our JS/JQuery-based scraper will look at Tufts' official dining pages to determine what's being served in the dining hall each day.

To start, we can parse just the current day's meals in both Dewick and Carmichael and display those to the user. Then we can add the remaining locations, and save day-by-day navigation for last.

URLS

There's a desktop and a mobile version of each page. I haven't checked, but it's likely that there's a benefit to using one over the other.

Desktop: http://menus.tufts.edu/foodpro/longmenu.asp?sName=TUFTS+DINING&locationNum=11&locationName=Dewick-MacPhie+Dining+Center&dtdate=1%2F31%2F2015&mealName=Breakfast

Mobile: http://menus.tufts.edu/fpmobile/longmenu.asp?sName=TUFTS+DINING&locationNum=11&locationName=Dewick-MacPhie+Dining+Center&dtdate=1%2F31%2F2015&mealName=Breakfast

Clicking a menu item brings you to a page with that item's nutritional information, like this:

http://menus.tufts.edu/foodpro/label.asp?locationNum=11&locationName=Dewick-MacPhie+Dining+Center&dtdate=1%2F31%2F2015&RecNumAndPort=031002%2A4

I'm not sure if Dewick, Carmichael and others share the same nutritional labels. Judging by the URL structure it seems they don't.

Actually, this URL can be simplified to just: http://menus.tufts.edu/foodpro/label.asp?RecNumAndPort=031002

Notifications

Because this is a webapp, push notifications probably won't be possible. Instead, we can notify users when their favorite food will be served within the next 2-3 days using something like this:

  • Store the user's favorite foods in a cookie
  • On load, check if their favorite food is listed in the HTML of any menu within the next 1-2 days
  • If it is, tell the user within the main Food bubble that their favorite food will be served "Tomorrow in Dewick for lunch"
Clone this wiki locally