Andre0512 / Andre0512/lidl-plus

Set Favorite Market

未關閉
#9 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
149
分支
37
PR 合併指標
30 天內沒有已合併 PR

描述

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')`

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。