I do not believe this is a copy of Download Dataset From ArcGIS REST Service or Extracting data from ArcGIS REST endpoint? due to the source and type of service.
I would like to copy the features from a government ArcGIS REST Service. It is a MapServer so I am not sure how, or if it is possible. I tried replicating a code I used to copy a FeatureServer but that did not work and instead got an ERROR 999999 which isn't very helpful for diagnosing what is wrong.
The code is as follows:
# Set environment options
arcpy.env.overwriteOutput=True
# Set workspace
ws = r'c:/ws'
wsGDB = os.path.join(ws, 'EnvironmentalContamination.gdb')
# MO Hazardous Waste from DNR
conFields = "https://gis.dnr.mo.gov/arcgis/rest/services/e_start/e_start/MapServer/0"
# Copy fc from rest service
conCopy = "MOContamination"
memCon = arcpy.management.CopyFeatures(conFields, conCopy)