Scrape Value is unknown, help to find the correct Select

Hi, what’s the select going to be here?

https://www.ryanair.com/pl/pl/trip/flights/select?adults=2&teens=0&children=1&infants=0&dateOut=2023-06-22&dateIn=2023-06-29&isConnectedFlight=false&isReturn=true&discount=0&promoCode=&originIata=POZ&destinationIata=CFU&tpAdults=2&tpTeens=0&tpChildren=1&tpInfants=0&tpStartDate=2023-06-22&tpEndDate=2023-06-29&tpDiscount=0&tpPromoCode=&tpOriginIata=POZ&tpDestinationIata=CFU

- platform: scrape
  name: samolocikkk
  resource: https://www.ryanair.com/pl/pl/trip/flights/select..........................
  select: ".span.price-value.h2.text-700.ng-tns-c164-17"
  value_template: '{{ ((value.split(" ")[0])) }}'

You can’t get that via scrape — the page is dynamically-generated by the browser. If you do a View Source (rather than Inspect), you’ll see the actual code from the server in its entirety looks like this:

The scrape integration can only process HTML as it is served: it cannot run any of the code that generates the page.

Can it be extracted in another way?

Practically, no. You’d need to write a programme within a browser that you left running to evaluate this number periodically and somehow send the result to HA.

Thank you for your help and time. Regards.

1 Like