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:
程序员阿江(Relakkes)
2025-12-26 23:27:19 +08:00
parent 1544d13dd5
commit 157ddfb21b
93 changed files with 1971 additions and 1955 deletions

View File

@@ -21,8 +21,8 @@
# -*- coding: utf-8 -*-
# @Author : relakkes@gmail.com
# @Time : 2023/12/2 11:18
# @Desc : 爬虫 IP 获取实现
# @Url : 快代理HTTP实现官方文档https://www.kuaidaili.com/?ref=ldwkjqipvz6c
# @Desc : Crawler IP acquisition implementation
# @Url : KuaiDaili HTTP implementation, official documentation: https://www.kuaidaili.com/?ref=ldwkjqipvz6c
import json
from abc import ABC, abstractmethod
from typing import List
@@ -43,8 +43,8 @@ class ProxyProvider(ABC):
@abstractmethod
async def get_proxy(self, num: int) -> List[IpInfoModel]:
"""
获取 IP 的抽象方法,不同的 HTTP 代理商需要实现该方法
:param num: 提取的 IP 数量
Abstract method to get IP, different HTTP proxy providers need to implement this method
:param num: Number of IPs to extract
:return:
"""
raise NotImplementedError
@@ -57,7 +57,7 @@ class IpCache:
def set_ip(self, ip_key: str, ip_value_info: str, ex: int):
"""
设置IP并带有过期时间到期之后由 redis 负责删除
Set IP with expiration time, Redis is responsible for deletion after expiration
:param ip_key:
:param ip_value_info:
:param ex:
@@ -67,8 +67,8 @@ class IpCache:
def load_all_ip(self, proxy_brand_name: str) -> List[IpInfoModel]:
"""
从 redis 中加载所有还未过期的 IP 信息
:param proxy_brand_name: 代理商名称
Load all unexpired IP information from Redis
:param proxy_brand_name: Proxy provider name
:return:
"""
all_ip_list: List[IpInfoModel] = []