with open(filename_csv , 'w', newline='',encoding="utf-8") as csv_file:
import io with io.open(fname, "w", encoding="utf-8") as f: f.write(html)