import requests
import reserviceName = 'SampleWorldCities'
baseUrl = 'http://localhost:6080/arcgis/rest/services/'
serveiceUrl = baseUrl + serviceName + '/MapServer'
GET_Respose = requests.get(serveiceUrl)
xmldoc = GET_Respose.content
scalesstr = re.findall(r'<li>Scale: (.*?)</li>',xmldoc)
scale = map(int,scalesstr)
print scale
网友评论