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.
- 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).
- 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
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/.