Great tool. I wonder if anyone could help me though - I’m having some issues trying to get it to login to one site. Not sure if it is something specific to the site, or if I’ve missed something, but any suggestions are welcome!
This is the raw html being generated on the page being scraped, and I’m just trying to get the data out of #lblPHMeasure which in this case is currently 7.9. No longer seeing index out of range errors, just:
2021-09-11 13:52:46 ERROR (MainThread) [custom_components.multiscrape.sensor] Sensor multiscrape-pH was unable to extract data from HTML
I’m getting the same error if I just use the standard scrape sensor, so starting to think that maybe something else is happening here - I might move on to do something else for now so I can look at it with fresh eyes later…
Thanks for this component!
I have an issue with my boiler page.
I am getting error messages from the logs:
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape.scraper] Updating from http://10.4.149.20/login.cgi
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape.scraper] Submitting form data {'username': 'secret', 'password': 'secret2', 'submit': None, 'extra': 'field'} to http://10.4.149.20/login.cgi
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape.scraper] Updating from http://10.4.149.20
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape] Finished fetching scraper data data in 0.969 seconds (success: True)
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape.sensor] Exception selecting sensor data: list index out of range
2021-09-11 18:08:01 ERROR (MainThread) [custom_components.multiscrape.sensor] Sensor boiler_temp was unable to extract data from HTML
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape.sensor] Exception selecting sensor data: list index out of range
2021-09-11 18:08:01 ERROR (MainThread) [custom_components.multiscrape.sensor] Sensor solar_temp_tpo was unable to extract data from HTML
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape.sensor] Exception selecting sensor data: list index out of range
2021-09-11 18:08:01 ERROR (MainThread) [custom_components.multiscrape.sensor] Sensor solar_temp_tpm was unable to extract data from HTML
2021-09-11 18:08:01 DEBUG (MainThread) [custom_components.multiscrape.binary_sensor] Exception selecting sensor data: list index out of range
2021-09-11 18:08:01 ERROR (MainThread) [custom_components.multiscrape.binary_sensor] Sensor boiler_state was unable to extract data from HTML
@danieldotnl Can you give me an example how/where I can implement the on-error option? I see it twice, one under Sensor/Binary Sensor and one under Sensor Attributes.
For my sensors I would like to add the values:
log: info
value: last
Invalid config for [multiscrape]: [on-error] is an invalid option for [multiscrape]. Check: multiscrape->multiscrape->0->sensor->1->on-error.
I ended up switching to the scrape sensor, and it’s doing what I want it to. That being said, does my head in trying to find the correct selector, I have no idea why it’s so hard
@danieldotnl I’m trying to scrape some weather data into a sensor’s attributes. All working good except one attribute and I don’t know if is a bug or am I just doing something wrong
The code below returns null in the attribute wind_direction
@Szaman there are other tables in the page and the scraper extracts the first it finds. That is why you should be more specific with the selector.
Your second try was correct but you shouldn’t delete the tbody part.
Try again with