smck83
(Scott)
1
Hello,
I would like to scrape COVID case data from
In particular I want three separate sensors
I have attempted the below to no avail. Can someone please confirm if HA only supports CSS path and not Xpath?
- platform: scrape
name: NSW Covid Cases - Total
resource: https://covidlive.com.au/report/daily-cases/nsw
select: "#content > div > div > section > table > tbody > tr:nth-child(2) > td.COL3.CASES"
Is there a way for me to debug this? the logs are fairly vague
smck83
(Scott)
2
Using CSS Selector Tester from CSS Selector Tester - Chrome Web Store i managed to get it working
For anyone else interested though what is confusing is the select statement above also worked for css selector tester
- platform: scrape
name: NSW Covid Cases - Total
resource: https://covidlive.com.au/report/daily-cases/nsw
select: ".DAILY-CASES tr:nth-child(2) .COL3.CASES"
- platform: scrape
name: NSW Covid Cases - Today
resource: https://covidlive.com.au/report/daily-cases/nsw
select: ".DAILY-CASES tr:nth-child(2) .COL5.NET"
- platform: scrape
name: NSW Covid Cases - Last Update
resource: https://covidlive.com.au/report/daily-cases/nsw
select: ".DAILY-CASES tr:nth-child(2) .COL1.DATE"
2 Likes
DrewXT
(Andrew)
3
Iām not entirely sure I get how it works, but thanks heaps - I was banging my head against exactly the same issue, and had no idea how to fix it!!