Any idea why the tracker works with line DATA_SOURCE = "https://api.covidtracking.com/v1/us/current.json"
but not with DATA_SOURCE = "/https://api.covidtracking.com/v1/states/va/current.json"?
MAGTAG COVID TRACKER API ADDRESS
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: MAGTAG COVID TRACKER API ADDRESS
Is that leading "/" at the beginning of your second example the problem?
- rmooney
- Posts: 7
- Joined: Mon Apr 24, 2017 5:01 pm
Re: MAGTAG COVID TRACKER API ADDRESS
Sorry, that was a typo in the post.
- rmooney
- Posts: 7
- Joined: Mon Apr 24, 2017 5:01 pm
Re: MAGTAG COVID TRACKER API ADDRESS
Solved! I didn't realize that even though the website was the same the state json data is slightly different and you do not need the "0" in the code where it fetches the data. The code works fine for state data when that is removed.
- KzooPackFan
- Posts: 3
- Joined: Fri Oct 23, 2020 11:09 am
Re: MAGTAG COVID TRACKER API ADDRESS
Thanks for the solution! I've been trying to get this to work with the state data and now it does!
- Powderjockey
- Posts: 189
- Joined: Fri Mar 31, 2017 10:14 pm
Re: MAGTAG COVID TRACKER API ADDRESS
Anyone out there that can help with me with the Canadian data? I have this API https://api.opencovid.ca/summary?date=today&loc=canada . The website say they have json data, but there is no json extension used in the URL.
There in Mu is, Some error occured, trying again later - The specified json_path was not found in the results.
There in Mu is, Some error occured, trying again later - The specified json_path was not found in the results.
Please be positive and constructive with your questions and comments.