Building a weather tool. I get the error 'Error parsing document, try a different parse string' no matter what.

Sam Mozaffari on 7 May 2022
Latest activity Edit by Vinod on 9 May 2022

Hey guys, I am trying to get a certain value from this webpage (wave height in metres) and store it in a variable. whenever I test my API, I get this error. I have even tried existing examples that other people claim are working for them and they do not work for me.
Error parsing document, try a different parse string.
This is the webpage I am taking the information from.
This is the current Xpath that I am using for the swell height value I want.
/html/body/div[3]/div/main/div[3]/div[1]/mhl-datatables/div/div[1]/div/ngx-datatable/div/datatable-body/datatable-selection/datatable-scroller/datatable-row-wrapper/datatable-body-row/div[2]/datatable-body-cell[2]/div/span
Vinod
Vinod on 8 May 2022 (Edited on 9 May 2022)
It appears that the website is restricted when accessed from outside Australia. When I access the page in the US, the page gets redirected to this: https://mhl.nsw.gov.au/External
Likely what is happening is that when ThingHttp retrieves the page, it is also getting redirected and can't find the parse string. I think the only solution in this case might be to find another site that provides the same information.
Sam Mozaffari
Sam Mozaffari on 8 May 2022
I think I've found the issue is that the JS loads later, which causes the error. Thanks