PDA

View Full Version : Get the latest image from web folder over http


xboxnerd
2005-06-09, 23:03
hi,

i want to download the latest image file (by date and time) from the web folder over http. currently i managed to get the file but i am not checking for the date.
there are multiple files in the web folder.


web = "http://server.com/webfolder/image.gif"
local = "q:\\apps\\xbmc\\scripts\\folder\\image.gif"

self.downloadurl(webfile,localfile)

def downloadurl(self, source, destination):
try:
loc = urllib.urlopener()
loc.retrieve(source, destination)
self.message(download_ok_msg)
except:
self.message(download_failed_msg)


how can i achieve that?
thanks.

/// xboxnerd