, , , , , ,SaveList(file_name, List)
, , , ,elif i.find('<title>')==0:
, , , , , ,s = i[10:-13]
, , , , , ,file_name = os.path.join(cur_dir, s)
, , , ,elif i.find('</p>')>-1:
, , , , , ,i = ''
, , , ,else:
, , , , , ,List.append(i[3:]) , ,
, , , ,continue
, , , ,
, ,if folder:
, , , ,if i.find('<title>')==0:
, , , , , ,s = i[10:-13]
, , , , , ,cur_dir = os.path.join(cur_dir, s)
, , , , , ,stack.insert(0,cur_dir)
, , , , , ,if os.path.isdir(cur_dir):
, , , , , , , ,sys.exit(cur_dir + ' - exists')
, , , , , ,os.mkdir(cur_dir)
, , , , , ,folder = False
, , , ,continue
, ,if i.find('<section')==0:
, , , ,if i.find('type="d"')> -1:
, , , , , ,folder = True
, , , ,else:
, , , , , ,if i.find('type="f"')> -1:
, , , , , , , ,text_f = True
, , , , , , , ,List.clear()
, ,if i.find('</section')==0:
, , , ,if len(stack)>0: