I am trying to import the extended 14-day forecast into Google Sheets. Some of the research I have been looking for are outdated and I would love some help for my knowledge gaps.
I tried =importXML and =importHTML and get an Error that says Cannot Fetch URL.
In cell A2 is the URL: "https://www.timeanddate.com/weather/mexico/mexico-city/ext"
In cell B2 is this formula with xpath: =IMPORTXML(A2,"//*[@class='zebra tb-wt fw va-m tb-hover']")
I also tried in B2: =IMPORTHTML(A2, "table", 2)
I also read weather sites may use scripting so I'd have to try importJSON.
I added to Google Sheets App Script from: https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4#file-import_json_appsscript-js
I then tried:
=IMPORTJSON("https://www.timeanddate.com/weather/usa/atlanta/ext?$format=json",table,2)
All gave me errors like Error Fetching URL.
Any instructions/clarifications would be appreciated. Thank you!
Can also try with Google Weather or Weather.com or Accuweather if easier.
