I am trying to scrape the total precipitation from this web site.
I got it working with a python script below but can’t find the correct paraments for the scrape sensor.
Any suggestions are appreciated.
import requests
from bs4 import BeautifulSoup
page = requests.get('https://weather.gc.ca/city/pages/bc-74_metric_e.html')
soup = BeautifulSoup(page.text, 'html.parser')
mm = soup.find_all(class_='wxo-metric-hide')[141].get_text()
print (mm);
This doesn’t work
################################################
- platform: scrape
name: Rainfall
resource: https://weather.gc.ca/city/pages/bc-74_metric_e.html
select: 'wxo-metric-hide'
index: 141
##########################################