Skip to main content

Fetch receipts and more from Lidl Plus

Project description

This python package is unofficial and is not related in any way to Lidl. It was developed by reversed engineered requests and can stop working at anytime!

Python Lidl Plus API

GitHub Workflow Status PyPI - Status PyPI PyPI - Python Version PyPI - License PyPI - Downloads

Fetch receipts and more from Lidl Plus.

Installation

pip install lidl-plus

Authentication

To login in Lidl Plus we need to simulate the app login. This is a bit complicated, we need a web browser and some additional python packages. After we have received the token once, we can use it for further requestes and we don't need a browser anymore.

Prerequisites

  • Check you have installed one of the supported web browser
    • Chromium
    • Google Chrome
    • Mozilla Firefox
  • Install additional python packages
    pip install "lidl-plus[auth]"
    

Commandline-Tool

$ lidl-plus auth
Enter your language (de, en, ...): de
Enter your country (DE, AT, ...): AT
Enter your lidl plus username (phone number): +4915784632296
Enter your lidl plus password:
Enter the verify code you received via phone: 590287
------------------------- refresh token ------------------------
2D4FC2A699AC703CAB8D017012658234917651203746021A4AA3F735C8A53B7F
----------------------------------------------------------------

Python

from lidlplus import LidlPlusApi

lidl = LidlPlusApi(language="de", country="AT")
lidl.login(phone="+4915784632296", password="password", verify_token_func=lambda: input("Insert code: "))
print(lidl.refresh_token)

Usage

Currently, the only feature is fetching receipts

Receipts

Get your receipts as json and receive a list of bought items like:

{
    "currentUnitPrice": "2,19",
    "quantity": "1",
    "isWeight": false,
    "originalAmount": "2,19",
    "extendedAmount": "1,98",
    "description": "Vegane Frikadellen",
    "taxGroup": "1",
    "taxGroupName": "A",
    "codeInput": "4023456245134",
    "discounts": [
        {
            "description": "5€ Coupon",
            "amount": "0,21"
        }
    ],
    "deposit": null,
    "giftSerialNumber": null
},

Commandline-Tool

$ lidl-plus --language=de --country=AT --refresh-token=XXXXX receipt --all > data.json

Python

from lidlplus import LidlPlusApi

lidl = LidlPlusApi("de", "AT", refresh_token="XXXXXXXXXX")
for receipt in lidl.tickets():
    pprint(lidl.ticket(receipt["id"]))

Help

Commandline-Tool

Lidl Plus API

options:
  -h, --help                show this help message and exit
  -c CC, --country CC       country (DE, BE, NL, AT, ...)
  -l LANG, --language LANG  language (de, en, fr, it, ...)
  -u USER, --user USER      Lidl Plus login username
  -p XXX, --password XXX    Lidl Plus login password
  --2fa {phone,email}       choose two factor auth method
  -r TOKEN, --refresh-token TOKEN
                            refresh token to authenticate
  --skip-verify             skip ssl verification
  --not-accept-legal-terms  not auto accept legal terms updates
  -d, --debug               debug mode

commands:
  auth                      authenticate and get token
  receipt                   output last receipts as json

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lidl-plus-0.2.5.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lidl_plus-0.2.5-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file lidl-plus-0.2.5.tar.gz.

File metadata

  • Download URL: lidl-plus-0.2.5.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for lidl-plus-0.2.5.tar.gz
Algorithm Hash digest
SHA256 c7e3a1444bbe29e70a4b42495b9ce444bbac95b99471ccf2342ab334354b6471
MD5 8c824cab5f0b3d0e4e120dd3c7c91328
BLAKE2b-256 f66a98e7d8e03e0384b991207f6b760dcf189301e46c263a60635045d1884b51

See more details on using hashes here.

File details

Details for the file lidl_plus-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: lidl_plus-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for lidl_plus-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 25cc9880ddd82da085c9ea1221f02ed8d8fe2e75b027ea90364927c3c34834a9
MD5 97e8f11cc6c96d5ce103116f6547158c
BLAKE2b-256 dc8ab24a67a85ea7651dbe8e778693e7d230094f5fb081e58483142a12fb119a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page