diff --git a/markdown_crawler/__init__.py b/markdown_crawler/__init__.py index 8f19d1d..7f78ca0 100644 --- a/markdown_crawler/__init__.py +++ b/markdown_crawler/__init__.py @@ -137,7 +137,7 @@ def crawl( # ------------------------------ # Write markdown content to file # ------------------------------ - with open(file_path, 'w') as f: + with open(file_path, 'w', encoding="utf-8") as f: f.write(output) else: logger.error(f'❌ Empty content for {file_path}. Please check your targets skipping.') @@ -356,4 +356,4 @@ def md_crawl( for t in threads: t.join() - logger.info('🏁 All threads have finished') \ No newline at end of file + logger.info('🏁 All threads have finished')