Andre0512 / Andre0512/lidl-plus

Set Favorite Market

Open
#9 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
149
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hi,

thanks for providing this nice package.
With feature #7 it's possible to automatically activate all coupons available to all markets. However, there may be coupons that are only available to the selected favorite market. In the app, this favorite market can be selected under settings.

Without setting a favorite market, the first part of the response of `LidlPlusApi.coupons()` looks like this: `{'name': 'FavoriteStore', 'coupons': []}`
To automatically enable the coupons for the favorite market as well, it would be nice to support the selection of the favorite market per API.

By the way, in case someone runs into the same problem:
Some LIDL coupon names are not UTF-8 compliant. This may lead to such an error when printing the coupon name:
`UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in position 1120: ordinal not in range(256)`
Therefore, it might be worth sanitizing the string before using it further. For me, the following encoding of the string worked:
`coupon["title"].encode('utf8', 'ignore')`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.