最佳答案
我试图做一个抓取'</html>'标签后的所有东西并删除它,但我的代码似乎没有做任何事情。.replace()不支持正则表达式吗?
z.write(article.replace('</html>.+', '</html>'))