import arcpy

arcpy.env.overwriteOutput = True

service = 'https://services8.arcgis.com/HCOT30BFUWvevW8A/arcgis/rest/services/Drainage/FeatureServer/4'
local = r'C:\Work\GIS\Staging\ditch.shp'

print('downloading ' + service + ' to ' + local)
arcpy.CopyFeatures_management(service, local)
print('Downloaded ' + service + ' to ' + local)
