mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-03-19 01:37:37 +08:00
i18n: translate all Chinese comments, docstrings, and logger messages to English
Comprehensive translation of Chinese text to English across the entire codebase: - api/: FastAPI server documentation and logger messages - cache/: Cache abstraction layer comments and docstrings - database/: Database models and MongoDB store documentation - media_platform/: All platform crawlers (Bilibili, Douyin, Kuaishou, Tieba, Weibo, Xiaohongshu, Zhihu) - model/: Data model documentation - proxy/: Proxy pool and provider documentation - store/: Data storage layer comments - tools/: Utility functions and browser automation - test/: Test file documentation Preserved: Chinese disclaimer header (lines 10-18) for legal compliance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
4
main.py
4
main.py
@@ -114,7 +114,7 @@ async def async_cleanup() -> None:
|
||||
except Exception as e:
|
||||
error_msg = str(e).lower()
|
||||
if "closed" not in error_msg and "disconnected" not in error_msg:
|
||||
print(f"[Main] 清理CDP浏览器时出错: {e}")
|
||||
print(f"[Main] Error cleaning up CDP browser: {e}")
|
||||
|
||||
elif getattr(crawler, "browser_context", None):
|
||||
try:
|
||||
@@ -122,7 +122,7 @@ async def async_cleanup() -> None:
|
||||
except Exception as e:
|
||||
error_msg = str(e).lower()
|
||||
if "closed" not in error_msg and "disconnected" not in error_msg:
|
||||
print(f"[Main] 关闭浏览器上下文时出错: {e}")
|
||||
print(f"[Main] Error closing browser context: {e}")
|
||||
|
||||
if config.SAVE_DATA_OPTION in ("db", "sqlite"):
|
||||
await db.close()
|
||||
|
||||
Reference in New Issue
Block a user