this is the program that i used to parse the output and save the contents...
import sys
import re
import os
directory = 'd:\\scripts\\myhack\\'
filelist = os.listdir(directory)
f = open(r'd:\full.html','w')
for filename in filelist:
print filename
file = open(os.path.join(directory,filename),'r')
content = file.read()
sindex = content.find('
') endIndex = content.find('') newcon = content[sindex:endIndex+11].replace('textarea','pre').replace('button','button style=\"visibility:hidden\"')+' |
f.write('---------------------------------------------------------------')
f.write(''+filename+'')
f.write('\n')
f.write('---------------------------------------------------------------')
f.write('\n')
f.write(newcon)
f.write('\n')
f.close()
No comments:
Post a Comment