#!/usr/bin/python2.7 import urllib def getInfo(): audio, video, image = urllib.urlopen("http://localhost:8200").read()[111:-22].split("
") audiod = audio.split(" files: ") videod = video.split(" files: ") imaged = image.split(" files: ") info = {audiod[0]: int(audiod[1]), videod[0]: int(videod[1]), imaged[0]: int(imaged[1])} return info def main(): info = getinfo() print "MiniDLNA status" print "Audio files:", str(info["Audio"]) print "Video files:", str(info["Video"]) print "Image files:", str(info["Image"]) if __name__ == "__main__": main()