Python Beautifulsoup Escribe en el archivo

with open("output1.html", "w", encoding='utf-8') as file:
    file.write(str(soup))
Dark Dog