home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.38k stars 30.64k forks source link

Scrape sensor and Denonon AVR not working on 79.3 #17189

Closed ghost closed 5 years ago

ghost commented 6 years ago

@trevor61 commented on Oct 6, 2018, 12:29 AM UTC:

Upgraded to Hass.io 0.79.3 yesterday now scrape sensor is not working

Unable to extract data from HTML
09:46 components/sensor/scrape.py (ERROR)

This issue was moved by frenck from home-assistant/hassio#742.

ghost commented 6 years ago

@frenck commented on Oct 6, 2018, 1:19 PM UTC:

/move home-assistant/home-assitant

ghost commented 6 years ago

move[bot] commented on Oct 6, 2018, 1:20 PM UTC:

⚠️ The [GitHub App](https://github.com/apps/move) must be installed for the target repository.
trevor61 commented 6 years ago

I have resolved the Denon AVR issue (the unit had gone offline for some unknown reason) but have not found the solution for the scrape sensor

fabaff commented 6 years ago

Can you provide some more details, please? In a lot of cases is the scrape sensor no working because the website changed its layout.

trevor61 commented 6 years ago

These are my scrape sensor definitions, the problem does not appear to be incorrect data being returned but no data at all.

############################################################
#
# Scrape sensor for BOM weather forecasts
#
############################################################
- platform: scrape
  resource: http://www.bom.gov.au/sa/forecasts/elizabeth.shtml
  name: Tomorrow Maximum
  select: '.max'
  unit_of_measurement: '  C Max'

- platform: scrape
  resource: http://www.bom.gov.au/sa/forecasts/elizabeth.shtml
  name: Tomorrow Minimum
  select: '.min'
  unit_of_measurement: '  C Min'

- platform: scrape
  resource: http://www.bom.gov.au/sa/forecasts/elizabeth.shtml
  name: Elizabeth Tomorrow
  select: 'p:nth-of-type(6)'

- platform: scrape
  resource: http://www.bom.gov.au/sa/forecasts/elizabeth.shtml
  name: Elizabeth Today
  select: 'p:nth-of-type(4)'
fabaff commented 6 years ago

If you enable logging then I guess that you will get the same output.

2018-10-07 23:30:44 DEBUG (SyncWorker_1) [homeassistant.components.sensor.rest] Updating from http://www.bom.gov.au/sa/forecasts/elizabeth.shtml
2018-10-07 23:30:44 DEBUG (SyncWorker_1) [homeassistant.components.sensor.scrape] <html><head>
<title>Access Denied</title>
</head><body>
<h1>Access Denied</h1>

You don't have permission to access "http://www.bom.gov.au/sa/forecasts/elizabeth.shtml" on this server.<p>
Reference #18.56d96b68.1538947844.142d082a
</p></body>
</html>

Not sure what's needed...wild guess is "user agent".

balloobbot commented 5 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

balloobbot commented 5 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍