Can someone help me fix my twitter scraper? I used to have a scrape sensor to check the gas price at my local gas station but it stopped working some time ago and I can’t get my head around the selector to get it working again.
- platform: scrape
resource: https://twitter.com/St1Sverige
name: 'ST1 Diesel'
select: 'p:nth-of-type(5)'
value_template: >-
{% if '#St1motala' in value %}
{{ value[value.find("Diesel") + 8:]|truncate(5, True, "")|replace(",",".")|float }}
{% else %}
{{ value }}
{% endif %}
unit_of_measurement: Kr/L
Feed from https://twitter.com/st1sverige