This is a very, very dirty way of turning ChangeDetection.io's price-mode output, which is JSON, into a more friendly markdown format. Using Jinja2, which is currently lacking a from_json
function, we replace parts of the JSON output to form a markdown message. This will only work correctly as long as ChangeDetection.io's price-mode override JSON format stays EXACTLY the same. Any non HTTP 200 response might trigger such a change in which case a malformed message might be produced and send. Not something that could (should) "break" your ChangeDetection.io or notification service. Which is Gotify in this example gist. Tested with Tweakers.net Pricewatch product pages.
Some Product has changed!
- Lowest: 235.67 → 235.65
- Highest: 482.57
- Sellers: 33
- Currency: EUR