You can use the json module to process the geojson. I was testing the following using python 2.7. It makes the URL request and writes a tab delimited file.
import urllib, urllib2, json, sys, time, collections
fw = open("covidUpdate.txt", "w")
URL = "https://services1.arcgis.com/0MSEUqKaxRlEPj5g/ArcGIS/rest/services/Coronavirus_2019_nCoV_Cases/FeatureServer/1/query"
query_dict = {
"where" : "1=1",
"outFields" : "*",
"f": "geojson" }
jsonResponse = urllib.urlopen(URL, urllib.urlencode(query_dict))
features = json.loads(jsonResponse.read(),
object_pairs_hook=collections.OrderedDict)[u'features']
fw.writelines("{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n".format(
'OBJECTID','Province_State','Country_Region','Last_Update','Latitude','Longitude','Confirmed','Recovered','Deaths'))
for f in features:
fw.writelines("{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n".format(
f['properties']['OBJECTID'],
f['properties']['Province_State'] if f['properties']['Province_State'] is not None else '',
f['properties']['Country_Region'],
time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(f['properties']['Last_Update']/1000)) if f['properties']['Last_Update'] is not None else '',
f['properties']['Lat'],
f['properties']['Long_'],
f['properties']['Confirmed'],
f['properties']['Recovered'],
f['properties']['Deaths']))
fw.close()
print 'Done.'
Results:
OBJECTID Province_State Country_Region Last_Update Latitude Longitude Confirmed Recovered Deaths
1 Abruzzo Italy 2020-05-22 23:32:40 42.35122196 13.39843823 3220 1647 394
2 Acre Brazil 2020-05-22 23:32:40 -9.0238 -70.812 3343 0 80
3 Aguascalientes Mexico 2020-05-22 23:32:40 21.8853 -102.2916 586 402 21
.....
I noticed that Provence_State is sometimes null/None, as was the timestamp on occasion. I kept the time in GMT/UTC, but you can convert it to local time if desired. It is also possible to use an insert cursor and create a feature layer if desired.
This should give you some ideas.