Skip to content

lunchplans is a small web-scraper/heroku app prototype that looks up the lunch menus at several restaurants near the TU Wien. This repository serves as illustration of simple, hard coded, web scraping.

Notifications You must be signed in to change notification settings

vjra/lunchplans

Repository files navigation

lunchplans

lunchplans is a small web-scraper/heroku app prototype that looks up the lunch menus at several restaurants near the TU Wien. In particular, it checks the following websites

and presents the menus on a simple website.

This repository serves as illustration of simple, hard coded, web scraping.

Features:

  • Uses the simply web framework flask to generate a dynamic webpage.
  • Uses camelot to extract information of a table in pdf and saves it into a pandas data frame. If this fails, it grabs a jpg with the same information, provided by the website, and uses PIL to slice it into the menus for a day.
  • Uses BeautifulSoup to extract information from an html page.
  • Updates every 6 days to look for a new pdf or jpg from dabba(https://nam-nam.at).

Installation on heroku:

  • Get a heroku account.
  • Use the information provided here to install OpenCV on heroku.
  • Follow the heroku deployment procedure:
$ heroku login
$ heroku create (if not already created)
$ git init
$ virtual/bin/pip3 freeze > requirements.txt
$ git add .
$ git commit -m "comment"
$ git push heroku master

Local installation:

Open a terminal and change directory to your preferred installation folder.

$ git clone https://github.com/vjra/lunchplans.git
§ (optional) create or switch into a virtual python3 enviroment.
$ pip3 install -r requirements.txt
$ python3 lunchplans.py

After execution, you find that the website runs locally on http://127.0.0.1:5000/.

Known issues.

In general:

Heroku deployment:

  • If the build process on heroku does not work out, look into requirements.txt for a package with version number 0.0.0 and delete it.
  • Apt-file: In order to use OpenCV on heroku, follow the instructions here.

About

lunchplans is a small web-scraper/heroku app prototype that looks up the lunch menus at several restaurants near the TU Wien. This repository serves as illustration of simple, hard coded, web scraping.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published