hi. i need some help to use scrape sensor to pull up the prices of the fuel of this page:
i want to extract the price of Gasolina 95 Simples , price of Gasolina 95 + and so on (the 5 prices)
i have done inspect on top of price that i want : and then copy and copy selecter
it gives this:
#station > div.box.main > div.precos > div:nth-child(1) > div.valor > div
and mark the price on the webpage.
but the proble is when i put on homeassistant , nothing shows
if i test on css selector text (extension of chrome) it works !
i have try on scrape plataform and in on multiscrape plataform too, and didnât work (i donât have any error on logs file) but the variavel shows empty no HA
my code on home assistant: configuration.yaml
- platform: scrape #sensor para ir buscar preço combustivel site mais gasolina:
name: gasol95 #preço_gasolina_95_repsol_vainhos_cresche
resource: https://www.maisgasolina.com/posto/2231/
#select: "6wMTIxLjYzOQ=="
#select: "div.encoded"
#select: "div.preco"
#select: "#station>div.box.main>div.precos>div:nth-child(1)>div.valor>div"
select: "div:nth-child(1)>div.valor"
headers:
User-Agent: Mozilla/5.0
- platform: multiscrape
name: home assistant scraper
resource: https://www.maisgasolina.com/posto/2231/
#scan_interval: 30
selectors:
version:
name: gasolprecomul
select: '#station > div.box.main > div.precos > div:nth-child(1) > div.valor > div'
#value_template: '{{ (value.split(":")[1]) }}'
releasedate:
name: gasolprecomul2
select: "div:nth-child(2)>div.valor"
headers:
User-Agent: Mozilla/5.0
can anyone help me ? please. i donât know what more to doâŠ
thanks