gmfiles= list(gmks) if len(gmfiles)>0: print "INFO: Found GM files!" print gmfiles else: print "INFO: No gmk files, Time to download..." try: page = urllib2.urlopen(url) soup = BeautifulSoup(page) tags = soup.findAll('a', style="color: #1a058b;") downlink= tags[0]['href'] print "INFO: Download link:"+downlink game=ConvertingEnigma.download(id,"http://64Digits.com/"+downlink,"../examples/") print "INFO: game name:"+game if ERROR_404==1: ConvertingEnigma.reset_globals() print "ERROR: 404 not found!" continue gmfiles = [] if string.find(game.lower(),".zip") !=-1: #if game ends with .zip gmfiles=ConvertingEnigma.extract(id,game,"/../examples/")#startingDir+game) elif string.find(game,".rar") !=-1: #if rar file print "ERROR: Rar file!" continue