Dissi
January 28, 2019, 11:16am
1
hi,
after updating to hass 86.X my scrape sensors are not working any more.
as some user tells, the configuration has changed.
- platform: scrape
resource: "http://www.clever-tanken.de/tankstelle_details/2262"
name: Diesel (Aral Hauptstr. 275 52379 Langerwehe)
select: 'span:nth-of-type(18)'
unit_of_measurement: '€'
scan_interval: 300
- platform: scrape
resource: "http://www.clever-tanken.de/tankstelle_details/17144"
name: Diesel (Esso Aachener Str. 544 50933 Köln)
select: 'span:nth-of-type(18)'
unit_of_measurement: '€'
scan_interval: 300
- platform: scrape
resource: "http://www.stadt-koeln.de/leben-in-koeln/verkehr/parken/parkhaeuser/"
name: Parkplätze Friesenplatz
select: 'strong:nth-of-type(26)'
unit_of_measurement: 'Frei'
scan_interval: 300
can someone help to fix the select command?
The last scrape sensor should scrape this source code:
<tr id=alte_wallgasse>
<td data-tablehead="Parkhaus / Freie Plätze">Alte Wallgasse<strong><br />1</strong></td>
<td data-tablehead="Art">Parkhaus</td>
<td data-tablehead="Adresse">Alte Wallgasse 31/Magnusstraße <br />50672 Köln</td>
<td data-tablehead="Betriebszeit">Montag bis Sonntag,<br /> durchgehend geöffnet</td>
<td data-tablehead="Preis">1,50 Euro pro Stunde<br /> 9 Euro pro Tag</td>
<td data-tablehead="Weitere Daten">Einfahrtshöhe: 2 Meter<br />Stellplätze: 250<br />
<a href="http://www.contipark.de/de-DE/find-parking/koeln-parkhaus-alte-wallgasse/" target="_blank" title="Neues Fenster: Weitere Informationen - Parkhaus Alte Wallgasse" class="linkextern standardlink">Weitere Informationen</a>
i want to retrieve the “1” between the strong html tag.
Some ideas to realize this?
Thanks,
dissi
Hi,
I got the same problem. I don’t have a solution on your issue, but instead of starting a new topic I borrow your thread. Hope it’s okay.
My scrape sensor stopped working with the update aswell, this was my config:
name: Lillhagsskolan lunch måndag
resource: https://skolmaten.se/lillhagsskolan/
select: 'div:nth-of-type(6)'
scan_interval: 14400
Edit: I solved mine.
Try this
- platform: scrape
resource: "http://www.clever-tanken.de/tankstelle_details/2262"
name: Diesel (Aral Hauptstr. 275 52379 Langerwehe)
select: 'div.fuel-price-entry:nth-of-type(1) span.price-field'
unit_of_measurement: '€'
scan_interval: 300
1 Like
Dissi
January 29, 2019, 12:13pm
4
Thanks a lot kernehed. Works great for both fuel prices. I also think i can reproduce how you got that.
But i have no idea how to deal with the third page. The field i want to scrape is only marked with strong and many tables, tr and td tags?
- platform: scrape
resource: "http://www.stadt-koeln.de/leben-in-koeln/verkehr/parken/parkhaeuser/"
name: Parkplätze Friesenplatz
select: 'strong:nth-of-type(26)'
unit_of_measurement: 'Frei'
scan_interval: 300
Is there any website with configuration examples?
Would this work?
- platform: scrape
resource: "http://www.clever-tanken.de/tankstelle_details/2262"
name: Diesel (Aral Hauptstr. 275 52379 Langerwehe)
select: 'tr#alte_wallgasse strong'
unit_of_measurement: '€'
scan_interval: 300
What field of it do you wanna scrape?
1 Like
OHBNO
August 27, 2019, 6:42pm
7
Hello, i am new to Home Assistant, and was wondering if it is possible that you can share your solution?
marah314
(Martin A)
October 8, 2019, 1:32pm
8
Hi!
how didi you solve this? Can you share how your select look likes?
I also tried to get the price for lpg from the same site. Without success
Can someone help me. I’m sorry for my english
- platform: scrape
resource: https://www.clever-tanken.de/tankstelle_details/33162
name: LPG (TAS Wülfingen)
select: ".prices-container > div:nth-child(5) > div.price-box.col-6"
unit_of_measurement: "€"
scan_interval: 300
hflocki
(Hflocki)
August 1, 2022, 9:38am
11
Try this
- platform: scrape
resource: https://www.clever-tanken.de/tankstelle_details/33162
name: LPG (TAS Wülfingen)
select: '#current-price-5'
unit_of_measurement: "€"
scan_interval: 300