Helper function that works recursively over Cemetech file category/directory pages.

def updateFromArchivePage(self, archiveRoot, names, files, parent = "/", verbose=False):
		"""Helper function that works recursively over Cemetech file category/directory pages."""
		root = archiveRoot + parent
		archive = urllib.urlopen(root)
		archiveText = archive.read()
		archive.close()
				
		# Recursively call this function on all subdirectories
		working = archiveText
		folderString = 'solid #aaa;"><a href="index.php?mode=folder&path='
		while folderString in working:
			index = working.find(folderString) + len(folderString)
			folder = working[index:]
			folder = folder[:folder.find('>') - 1]
			working = working[index + len(folder):]
			if folder != "" and folder.count("/") > parent.count("/"):
				if verbose:
					self.printd("  Caching " + folder)
				self.updateFromArchivePage(archiveRoot, names, files, folder, verbose)
				
		# Now, step through all files and write them to the names and files objects
		working = archiveText
		fileString = "../scripts/countdown.php?" #/73/basic/games/aod73.zip&path=archives"
		while fileString in working:
			# Get the filename and path of the file
			index = working.find(fileString) + len(fileString)
			fileData = working[index:]
			fileData = fileData[:fileData.find("&path=archives")]
			
			# Get the proper name (title) of the file
			working = working[index:]
			nameData = working[working.find('1.25em;"><b>') + len('1.25em;"><b>'):]
			nameData = nameData[:nameData.find('</B>')]
			
			# Write files to index objects
			files.write(fileData + "\n")
			names.write(nameData + "\n")