I would like to be able to run a python script each morning that checks each sites map service layers for proper functionality. Currently we have 10 sites with map services hosted by Geocortex and Flex.
I am able to run a script to open our sites in a browser and return a url code if they are up and running using
import webbrowser url = 'http://entgisweb01/CountyView/' webbrowser.open_new(url) import urllib2 def main(): # open a connection to a URL using urllib2 webUrl = urllib2.urlopen("http://gis.ventura.org/CountyViewNew") # get the result code and print it print "result code: " + str(webUrl.getcode()) print "http://gis.ventura.org/CountyViewNew" if __name__ == "__main__": main()
I would like to be able to check the layers of each map service within the sites using a python code instead of simply opening the site in a browser.