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!
Fetch receipts and more from Lidl Plus.
pip install lidl-plus
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.
- Check you have installed one of the supported web browser
- Chromium
- Google Chrome
- Mozilla Firefox
- Install additional python packages
pip install "lidl-plus[auth]"
$ lidl-plus auth
Enter your language (DE, EN, ...): DE
Enter your country (de, at, ...): de
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
----------------------------------------------------------------
from lidlplus import LidlPlusApi
lidl = LidlPlusApi(language="DE", country="de")
lidl.login(phone="+4915784632296", password="password", verify_token_func=lambda: input("Insert code: "))
print(lidl.refresh_token)
Currently, the only feature is fetching 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
},
$ lidl-plus --country=de --language=DE --refresh-token=XXXXX receipt --all > data.json
from lidlplus import LidlPlusApi
lidl = LidlPlusApi("DE", "de", refresh_token="XXXXXXXXXX")
for receipt in lidl.tickets():
pprint(lidl.ticket(receipt["id"]))