Prevent utf8 (e.g. emoji) breaking export
This commit is contained in:
parent
6907acc82a
commit
ec7aada1ed
@ -42,7 +42,7 @@ for book in books_data_data:
|
|||||||
|
|
||||||
book_html = requests.get(export_url, headers=header, verify=cert_verify_url)
|
book_html = requests.get(export_url, headers=header, verify=cert_verify_url)
|
||||||
with open(export_file_name, "w+") as file:
|
with open(export_file_name, "w+") as file:
|
||||||
file.write(book_html.text)
|
file.write(book_html.text.encode('utf8'))
|
||||||
|
|
||||||
print("Successfully exported book {}".format(book['name']))
|
print("Successfully exported book {}".format(book['name']))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user