<commit_before>var cheerio = require('cheerio');

exports.parseMenu = function(menuDate, html) {
    var $ = cheerio.load(html),
        diningNodes = {
            atwater: null,
            proctor: null,
            ross: null,
            language_tables: null
        },
        menu = {
            date: menuDate,
            dining_halls: {
                atwater: {
                    breakfast: null,
                    lunch: null
                },
                proctor: {
                    breakfast: null,
                    lunch: null,
                    dinner: null
                },
                ross: {
                    breakfast: null,
                    lunch: null,
                    dinner: null
                },
                language_tables: {
                    lunch: null
                }
            }
        },
        parseMeal = function(location, meal, $node) {
            var itemsArr = $node.find('.views-field-body').text().trim().split('\n');
            menu.dining_halls[location][meal] = itemsArr;
        };

    // Separate Atwater, Proctor, Ross
    $('div.view-content h3').each(function(i, elem) {
        var $this = $(elem);
        switch ($this.text()) {
            case 'Atwater':
                diningNodes.atwater = $this.next();
                break;
            case 'Proctor':
                diningNodes.proctor = $this.next();
                break;
            case 'Ross':
                diningNodes.ross = $this.next();
                break;
            case 'Language Tables':<commit_msg>Update scraper to check for language tables/proctor. Closes #2.<commit_after>var cheerio = require('cheerio');

exports.parseMenu = function(menuDate, html) {
    var $ = cheerio.load(html),
        diningNodes = {
            atwater: null,
            proctor: null,
            ross: null,
            language_tables: null
        },
        menu = {
            date: menuDate,
            dining_halls: {
                atwater: {
                    breakfast: null,
                    lunch: null
                },
                proctor: {
                    breakfast: null,
                    lunch: null,
                    dinner: null
                },
                ross: {
                    breakfast: null,
                    lunch: null,
                    dinner: null
                },
                language_tables: {
                    lunch: null
                }
            }
        },
        parseMeal = function(location, meal, $node) {
            var itemsArr = $node.find('.views-field-body').text().trim().split('\n');
            menu.dining_halls[location][meal] = itemsArr;
        };

    // Separate Atwater, Proctor, Ross
    $('div.view-content h3').each(function(i, elem) {
        var $this = $(elem);
        switch ($this.text()) {
            case 'Atwater':
                diningNodes.atwater = $this.next();
                break;
            case 'Proctor':
                diningNodes.proctor = $this.next();
                break;
            case 'Ross':
                diningNodes.ross = $this.next();
                break;
            case 'Language Tables/Proctor':
{'fraction_non_alphanumeric': 0.11011166253101737, 'fraction_numerical': 0.0009305210918114144, 'mean_word_length': 1.0633397312859885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3126958', 'n_tokens_mistral': 845, 'n_tokens_neox': 814, 'n_words': 171}