Giter VIP home page Giter VIP logo

rewe-discounts's Introduction

Rewe Discounts

Dieses Programm sucht mittels der Rewe-API für einen bestimmten Rewe-Markt die aktuellen Angebote und schreibt eine Markdown-formatierte Übersichtsliste heraus.

Zur besseren Preisvergleichbarkeit wird der Preis pro Referenzmenge (z.B. 100 g oder 100 ml) mit ausgegeben.

Anwendungsbeispiel:

  • Sonntags lädt der Server (z.B. Raspberry Pi/Debian) per cron-Job die neuen Angebote herunter, und speichert sie als Notiz in einer Nextcloud-Instanz zum komfortablen Abruf per Smartphone.

Abhängigkeiten

  • $ pip install cloudscraper

Verwendung

  • Aktuelles Release herunterladen bzw. Master-Branch klonen.
  • python3 ./rewe_discounts/rewe_discounts.py ausführen und Hilfetext durchlesen.
    • Mit rewe_discounts.py --list-markets PLZ lässt sich für eine beliebige Postleitzahl (PLZ) eine Marktliste inklusive der Market ID ausgeben lassen.
    • Wähle einen Markt und kopiere die ID, z.B. "562286".
    • Durch rewe_discounts.py --market-id 562286 --output-file "Angebote Rewe.md" werden die Angebote des Markets in eine Datei geschrieben.

Ein Ausschnitt von Angebote Rewe.md sieht beispielsweise so aus:

# Kochen & Backen
Gültig diese Woche bis Samstag, 30.05.2020

**Barilla Pasta**
- 0.79, 1 kg = 1.58
- versch. Ausformungen, je 500-g-Pckg.

**Knorr Grillsauce**
- 0.65, 100 ml = 0.26
- versch. Sorten, je 250-ml-Fl.

**Erasco Eintopf**
- 1.49, 1 kg = 1.86
- versch. Sorten, je 800-g-Dose

**Mondamin Milchreis im Becher**
- 0.79, 100 g = 1.36
- je 58-g-Becher

Es lassen sich bestimmte Produkte auch hervorheben und an erster Stelle der Datei platzieren. Hierzu wird noch eine Textdatei angelegt, und pro Zeile ein Suchbegriff wie "Nudeln" oder "Joghurt" eingegeben:

rewe_discounts.py --market-id 562286 --output-file "Angebote Rewe.md" --highlights=highlights.txt

rewe-discounts's People

Contributors

foo-git avatar oliverwehrens avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.