I've found myself often distracted waiting for websites to update, specifically checking for deals or show releases. So, like any good engineer, I've decided to automate this using changedetection.io, and, here's what I've come up with to satisfy my undefined requirements.
PriceSpy daily deals
Short and simple, we're just concatenating the children of a given element.
xpath://html/body/div[1]/div[3]/section/section/div[2]/div/div/div[2]/div/section/div[2]/div[2]/div[2]/div[*]/concat(div[1]/div/div[2]/div/span, " (",a/div/div[2]/div[1]/div/span[2],"): ", a/div/div[1]/span[2], " (", a/div/div[1]/span[1], ")")
12% ($89.00): SteelSeries Aerox 3 (Mice & Pointing Devices)
11% ($144.99): TP-Link Deco X20 Whole-Home Mesh WiFi Router (1-pack) (Routers)
Anime schedule
This one's a tad more complex, and, something I put together earlier before working out how to concat results.
Thankfully, their markup is well annotated so we can do some simple child class/id selectors.
xpath://*[@id="active-day"]//div[not(contains(@class, 'filtered-out'))]//*[contains(@class, 'show-title') or contains(@class, 'show-episode')]
And we format the notification with the following jinja2 template.
{% set list1 = current_snapshot.split('\n') %}
# Todays Releases
```diff
{% for i in range(0, list1 | count, 3) %}+ {{list1[i]}} - {{list1[i+2]}}
{% endfor %}
```
Which results in:
ChangeDetection.io Notification - https://animeschedule.net/
# Todays Releases
```diff
+ Blue Lock VS. U-20 JAPAN - Ep 14F
+ A-Rank Party wo Ridatsu shita Ore wa, Moto Oshiego-tachi to Meikyuu Shinbu wo Mezasu. - Ep 3
+ Maou 2099 - Ep 12F
+ Solo Leveling 2nd Season: Arise from the Shadow - Ep 4
+ Ao no Exorcist: Yosuga-hen - Ep 3
+ Medalist - Ep 6
+ Yu☆Gi☆Oh! Go Rush!! - Ep 5
+ SAKAMOTO DAYS - Ep 6
```