'use strict';
const request = require('request');
const cheerio = require('cheerio');
const url = 'http://siemens.sv-restaurant.ch/de/menuplan/';

class SVPageParser{

  parseToday(callback) {
    request(url, (err, resp, body) => {
      let $ = cheerio.load(body);
      let offers = $('#menu-plan-tab1').find('.menu-item');
      let message = this.formatDayMenu($, offers);
      callback(message);
    });
  }

  parseWeek(callback) {
    request(url, (err, resp, body) => {
      let $ = cheerio.load(body);
      let message = this.formatWeek($);
      callback(message);
    });
  }

  formatWeek($) {
    let days = $('.day-nav').find('li');

    let text = '';
    $(days).each((i, day) => {
      let dayName = $(day).find('.day').text();
      let dayDate= $(day).find('.date').text();
      let offers = $(`#menu-plan-tab${i+1}`).find('.menu-item');

      text += `*${dayName} ${dayDate}* \n`;
      text += `========\n`;
      text += this.formatDayMenu($, offers) + '\n';
    });

    return text;
  }

  formatDayMenu($, offers) {
    let text = '';
    $(offers).each(function (i, offer) {
      let menuDescription = $(offer).find('.menu-description');
      menuDescription.find('br').replaceWith(' ');

      text += '*' + removeSpecialCharacters($(offer).find('.menu-title').text().trim()) + '*';
      text += '_(' + removeSpecialCharacters($(offer).find('.menuline').text()) + ')_\n';
      text += removeSpecialCharacters(menuDescription.text()) + '\n';
      text += '_' + removeSpecialCharacters($(offer).find('.prices-3 .val').text() + ' ' + $(offer).find('.prices-3 .desc').text()) + "_\n";
      let provenance = removeSpecialCharacters($(offer).find('.menu-provenance').text());
      if (provenance.length > 1) {
        text += '_' + provenance + "_\n\n";
      } else {
        text += "\n";
      }
    });

    function removeSpecialCharacters(text) {
      return (text.replace(/[`*_#\r]/g, ''));
    }

    return text;
  }
}

module.exports = SVPageParser;

@@ -1232,17 +1232,17 @@
 ext += '
-*
+_
 ' + remo
@@ -1285,13 +1285,11 @@
 menu
--titl
+lin
 e').
@@ -1298,21 +1298,16 @@
 xt()
-.trim()
 ) + '
-*
+_%5Cn
 ';%0A 
@@ -1324,10 +1324,9 @@
 += '
-_(
+*
 ' + 
@@ -1361,35 +1361,37 @@
 fer).find('.menu
-lin
+-titl
 e').text()) + ')
@@ -1388,15 +1388,21 @@
 xt()
+.trim()
 ) + '
-)_
+*
 %5Cn';

add location on to of the answer