''' fb.write(headertxt) # 6.2 写文件主体 fb.write('\n
') fb.write(sn) cha = link[1].replace(sn,''); cha = cha.replace('第章 ','') fb.write(' ') fb.write(cha) fb.write('
\n') fb.write(chapter_content) # 6.2 写文件尾部 #ffooter = open('footer.html','r',encoding="UTF-8") #fb.write(ffooter.read()) #ffooter.close() //代码效果参考:http://www.zidongmutanji.com/bxxx/593216.html footertxt = '''