Need help to reconfigure scrape

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

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

That works thanks again!

Hello, i am new to Home Assistant, and was wondering if it is possible that you can share your solution? :slight_smile:

Hi!
how didi you solve this? Can you share how your select look likes?

Hey,

Checkout my repo:

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

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