Skip to content

ropc/rufoodscraper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Rutgers Nutritional Information Scraper

Scrapes food.rutgers.edu for menus and nutritional information, saves to file.

Official website reports wonky numbers for certain fields, so only scraping calories, serving size, and ingredients for now.

###Format Enable indentation with the --fancy flag.

Use the --dicts flag to organize for easier random access, like so:

{
	'Brower Commons' : {
		'Breakfast' : [
			'CATEGORY' : [
				{
					'name' : 'ITEM NAME',
					'serving' : 'SERVING SIZE',
					'calories' : 100,
					'ingredients' : [
						'INGREDIENT1',
						'INGREDIENT2',
						...
					]
				},
				{
					...
				},
				...
			],
			...
		],
		'Lunch' : {
			...
		},
		'Dinner' : {
			...
		},
		'Knight Room' : {
			...
		}
	},
	'Busch Dining Hall' : {
		...
	},
	'Neilson Dining Hall' : {
		...
	},
	'Livingston Dining Commons' : {
		...
	}
}

Use without the --dicts flag to organize with arrays like the old food API does.

[
	{
		'location_name' : 'LOCATION NAME'
		'meals' : [
			{
				'meal_name' : 'MEAL NAME',
				'genres' : [
					{
						'genre_name' : 'CATEGORY NAME'
						'items' : [
							{
								'name' : 'ITEM NAME',
								'serving' : 'SERVING SIZE',
								'calories' : 100,
								'ingredients' : [
									'INGREDIENT1',
									'INGREDIENT2',
									...
								]
							},
							...
						]
					},
					...
				]
			},
			...
		]
	},
	...
]

###Dependencies Python script requires package BeautifulSoup.

About

Scrapes basic nutrition information for Rutgers menus into JSON.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%