如何通过小红书API实现数据驱动的内容运营技术架构深度解析与实践方案【免费下载链接】xhs基于小红书 Web 端进行的请求封装。https://reajason.github.io/xhs/项目地址: https://gitcode.com/gh_mirrors/xh/xhs在小红书平台的内容运营中开发者常常面临数据获取困难、自动化程度低、内容分析效率低下等挑战。传统的手动操作不仅耗时耗力还难以实现规模化运营。基于小红书Web端封装的xhs开源项目为这些问题提供了技术解决方案通过API接口实现了数据获取、用户管理和内容分析的自动化。数据获取与反爬虫机制的技术挑战小红书平台的反爬虫机制对数据采集提出了严峻挑战。传统的爬虫方法往往因签名验证、请求频率限制和动态加载而失效。xhs项目通过逆向工程分析Web端通信协议实现了完整的签名生成机制确保API请求的合法性。签名算法的实现原理签名机制是xhs项目的核心技术之一。在xhs/help.py中sign函数负责生成请求所需的x-s和x-t参数def sign(uri, dataNone, ctimeNone, a1, b1): # 签名算法实现 # 通过分析Web端JavaScript生成的加密参数 # 确保请求的合法性和安全性实际使用中签名函数需要与Playwright结合使用模拟浏览器环境获取正确的加密参数def sign(uri, dataNone, a1, web_session): for _ in range(10): try: with sync_playwright() as playwright: # 初始化浏览器环境 browser chromium.launch(headlessTrue) browser_context browser.new_context() browser_context.add_init_script(pathstealth_js_path) context_page browser_context.new_page() context_page.goto(https://www.xiaohongshu.com) # 设置Cookie并重新加载 browser_context.add_cookies([ {name: a1, value: a1, domain: .xiaohongshu.com, path: /} ]) context_page.reload() sleep(1) # 调用Web端的签名函数 encrypt_params context_page.evaluate( ([url, data]) window._webmsxyw(url, data), [uri, data] ) return { x-s: encrypt_params[X-s], x-t: str(encrypt_params[X-t]) } except Exception: pass raise Exception(签名失败)客户端架构设计xhs项目的核心是XhsClient类位于xhs/core.py中。该类的设计遵循了以下原则会话管理通过requests.Session维护持久连接请求封装统一的request方法处理所有HTTP请求异常处理完整的异常体系在xhs/exception.py中定义数据转换自动处理JSON键名的驼峰式转下划线式class XhsClient: def __init__(self, cookieNone, user_agentNone, timeout10, proxiesNone, signNone): self.session requests.Session() self.timeout timeout self.proxies proxies self.sign sign if cookie: self.cookie cookie if user_agent: self.session.headers.update({User-Agent: user_agent})内容数据分析的实战应用方案用户行为数据采集与分析通过get_user_notes和get_user_all_notes方法可以获取用户的所有笔记数据实现用户行为分析# 获取用户笔记数据 def analyze_user_content_pattern(user_id): xhs_client XhsClient(cookie, signsign) # 获取用户所有笔记 all_notes xhs_client.get_user_all_notes(user_id, crawl_interval2) # 分析内容类型分布 content_types {} for note in all_notes: note_type note.get(type, unknown) content_types[note_type] content_types.get(note_type, 0) 1 # 分析发布时间规律 publish_times [] for note in all_notes: publish_time note.get(time, ) if publish_time: publish_times.append(parse_time(publish_time)) return { total_notes: len(all_notes), content_distribution: content_types, publish_pattern: analyze_time_pattern(publish_times) }内容推荐系统的实现FeedType枚举类定义了多种内容推荐类型支持按兴趣领域获取精准内容from xhs import FeedType def get_personalized_feed(user_interests): xhs_client XhsClient(cookie, signsign) # 根据用户兴趣获取不同类型的内容 feeds {} for interest in user_interests: feed_type get_feed_type_by_interest(interest) if feed_type: feeds[interest] xhs_client.get_home_feed(feed_type) return feeds def get_feed_type_by_interest(interest): # 映射兴趣到FeedType mapping { fashion: FeedType.FASION, food: FeedType.FOOD, cosmetics: FeedType.COSMETICS, travel: FeedType.TRAVEL, fitness: FeedType.FITNESS } return mapping.get(interest.lower())内容创作与管理的自动化实现多媒体内容上传与发布xhs项目支持图片和视频内容的上传与发布通过upload_file和create_note方法实现def publish_content_with_media(title, description, media_files, tagsNone): xhs_client XhsClient(cookie, signsign) # 获取上传许可 file_type image if media_files[0].endswith((.jpg, .png)) else video file_id, token xhs_client.get_upload_files_permit(file_type, len(media_files)) # 上传文件 uploaded_files [] for file_path in media_files: if file_type image: upload_result xhs_client.upload_file(file_id, token, file_path) else: upload_result xhs_client.upload_file_with_slice(file_id, token, file_path) uploaded_files.append(upload_result) # 创建笔记 note_info { title: title, desc: description, note_type: normal if file_type image else video, ats: tags or [], image_info: uploaded_files if file_type image else None, video_info: uploaded_files if file_type video else None } return xhs_client.create_note(**note_info)定时发布与批量管理通过post_time参数实现内容的定时发布结合批量操作实现高效的内容管理def schedule_content_publishing(content_list): xhs_client XhsClient(cookie, signsign) results [] for content in content_list: # 计算发布时间未来时间 publish_time calculate_publish_time(content[schedule]) # 准备内容数据 note_data { title: content[title], desc: content[description], note_type: content[type], post_time: publish_time, is_private: content.get(private, False) } # 添加多媒体文件 if content.get(images): note_data[image_info] prepare_image_info(content[images]) elif content.get(video): note_data[video_info] prepare_video_info(content[video]) # 创建定时笔记 result xhs_client.create_note(**note_data) results.append({ content_id: content[id], note_id: result.get(note_id), scheduled_time: publish_time, status: scheduled if result else failed }) return results性能优化与错误处理策略请求频率控制与重试机制在xhs/core.py的request方法中实现了智能的重试机制和频率控制def request(self, method, url, **kwargs): # 添加签名参数 if self.sign and not kwargs.get(quick_sign, False): headers self._pre_headers(url, kwargs.get(data, None)) kwargs[headers] {**kwargs.get(headers, {}), **headers} # 执行请求 response self.session.request( methodmethod, urlurl, timeoutself.timeout, proxiesself.proxies, **kwargs ) # 处理响应 if response.status_code ! 200: self._handle_error_response(response) return response异常处理体系xhs/exception.py中定义了完整的异常类体系确保程序的健壮性异常类型触发条件处理建议DataFetchError数据获取失败检查网络连接和签名参数IPBlockErrorIP被限制访问更换代理或等待限制解除NeedVerifyError需要验证码验证触发验证流程或使用备用账号SignError签名生成失败检查签名函数和Cookie有效性try: note xhs_client.get_note_by_id(note_id, xsec_token) print(json.dumps(note, indent4)) except DataFetchError as e: print(f数据获取失败: {e}) # 实现重试逻辑 retry_count 0 while retry_count 3: try: note xhs_client.get_note_by_id(note_id, xsec_token) break except DataFetchError: retry_count 1 sleep(2 ** retry_count) # 指数退避系统架构扩展与集成方案微服务架构集成xhs项目可以轻松集成到微服务架构中通过xhs-api/app.py提供的RESTful API接口from flask import Flask, request, jsonify from xhs import XhsClient app Flask(__name__) # 初始化客户端池 clients_pool {} app.route(/api/notes/note_id, methods[GET]) def get_note(note_id): user_id request.headers.get(X-User-ID) client get_or_create_client(user_id) try: xsec_token request.args.get(xsec_token, ) note client.get_note_by_id(note_id, xsec_token) return jsonify({ success: True, data: note }) except Exception as e: return jsonify({ success: False, error: str(e) }), 500 def get_or_create_client(user_id): if user_id not in clients_pool: # 从数据库或配置获取用户凭证 credentials get_user_credentials(user_id) clients_pool[user_id] XhsClient( cookiecredentials[cookie], signsign_function ) return clients_pool[user_id]数据持久化与缓存策略结合数据库和缓存系统实现数据的高效存储和快速访问import redis from datetime import timedelta class XhsDataService: def __init__(self, redis_client, db_session): self.redis redis_client self.db db_session self.xhs_client XhsClient(cookie, signsign) def get_note_with_cache(self, note_id, xsec_token): # 检查缓存 cache_key fnote:{note_id} cached_data self.redis.get(cache_key) if cached_data: return json.loads(cached_data) # 从API获取 note_data self.xhs_client.get_note_by_id(note_id, xsec_token) # 存储到缓存和数据库 self.redis.setex(cache_key, timedelta(hours1), json.dumps(note_data)) self.save_to_database(note_data) return note_data def get_user_notes_batch(self, user_id, cursor): # 批量获取用户笔记 notes self.xhs_client.get_user_notes(user_id, cursor) # 异步处理数据 self.process_notes_async(notes) return notes安全合规与最佳实践建议请求频率限制与合规使用为了避免对小红书平台造成压力建议实施以下限制策略请求间隔控制在get_user_all_notes等方法中设置crawl_interval参数并发限制限制同时进行的API请求数量错误退避实现指数退避算法处理失败请求class RateLimitedXhsClient(XhsClient): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.request_times [] self.max_requests_per_minute 30 def request(self, method, url, **kwargs): # 检查请求频率 current_time time.time() self.request_times [t for t in self.request_times if current_time - t 60] if len(self.request_times) self.max_requests_per_minute: sleep_time 60 - (current_time - self.request_times[0]) time.sleep(sleep_time) # 记录请求时间 self.request_times.append(current_time) return super().request(method, url, **kwargs)数据使用伦理指南在使用xhs项目进行数据采集和分析时应遵守以下伦理准则尊重用户隐私仅收集公开数据不获取用户隐私信息遵守平台规则不进行恶意爬取或干扰平台正常运行数据使用透明明确告知数据来源和使用目的商业用途合规获得必要授权后再进行商业化使用部署与监控方案容器化部署配置通过Docker容器化部署确保环境一致性和可扩展性FROM python:3.9-slim WORKDIR /app # 安装系统依赖 RUN apt-get update apt-get install -y \ wget \ gnupg \ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ echo deb http://dl.google.com/linux/chrome/deb/ stable main /etc/apt/sources.list.d/google.list \ apt-get update apt-get install -y google-chrome-stable \ rm -rf /var/lib/apt/lists/* # 安装Python依赖 COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 复制应用代码 COPY . . # 运行应用 CMD [python, xhs-api/app.py]监控与日志系统集成监控系统实时跟踪API使用情况和性能指标import logging from prometheus_client import Counter, Histogram # 定义监控指标 REQUEST_COUNT Counter(xhs_requests_total, Total API requests) REQUEST_DURATION Histogram(xhs_request_duration_seconds, Request duration) class MonitoredXhsClient(XhsClient): def request(self, method, url, **kwargs): # 记录请求开始时间 start_time time.time() try: REQUEST_COUNT.inc() response super().request(method, url, **kwargs) return response finally: # 记录请求耗时 duration time.time() - start_time REQUEST_DURATION.observe(duration) # 记录日志 logging.info(fRequest {method} {url} completed in {duration:.2f}s)总结与未来发展方向xhs项目为小红书平台的数据获取和内容管理提供了完整的技术解决方案。通过深入分析Web端通信协议项目实现了稳定的API接口解决了反爬虫机制带来的挑战。在实际应用中开发者应重点关注以下几个方面签名算法的维护随着平台更新需要持续跟踪签名算法的变化请求频率优化平衡数据获取需求和平台限制错误处理完善建立完善的异常恢复机制数据质量保证确保采集数据的准确性和完整性未来xhs项目可以在以下方向进行扩展支持更多小红书API接口提供更丰富的数据分析工具开发图形化管理和监控界面集成机器学习算法进行内容推荐分析通过合理使用xhs项目开发者和内容运营团队能够实现数据驱动的内容策略提升运营效率和决策质量。项目的开源特性也促进了技术社区的协作与创新为小红书生态系统的技术发展提供了有力支持。【免费下载链接】xhs基于小红书 Web 端进行的请求封装。https://reajason.github.io/xhs/项目地址: https://gitcode.com/gh_mirrors/xh/xhs创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
如何通过小红书API实现数据驱动的内容运营:技术架构深度解析与实践方案
如何通过小红书API实现数据驱动的内容运营技术架构深度解析与实践方案【免费下载链接】xhs基于小红书 Web 端进行的请求封装。https://reajason.github.io/xhs/项目地址: https://gitcode.com/gh_mirrors/xh/xhs在小红书平台的内容运营中开发者常常面临数据获取困难、自动化程度低、内容分析效率低下等挑战。传统的手动操作不仅耗时耗力还难以实现规模化运营。基于小红书Web端封装的xhs开源项目为这些问题提供了技术解决方案通过API接口实现了数据获取、用户管理和内容分析的自动化。数据获取与反爬虫机制的技术挑战小红书平台的反爬虫机制对数据采集提出了严峻挑战。传统的爬虫方法往往因签名验证、请求频率限制和动态加载而失效。xhs项目通过逆向工程分析Web端通信协议实现了完整的签名生成机制确保API请求的合法性。签名算法的实现原理签名机制是xhs项目的核心技术之一。在xhs/help.py中sign函数负责生成请求所需的x-s和x-t参数def sign(uri, dataNone, ctimeNone, a1, b1): # 签名算法实现 # 通过分析Web端JavaScript生成的加密参数 # 确保请求的合法性和安全性实际使用中签名函数需要与Playwright结合使用模拟浏览器环境获取正确的加密参数def sign(uri, dataNone, a1, web_session): for _ in range(10): try: with sync_playwright() as playwright: # 初始化浏览器环境 browser chromium.launch(headlessTrue) browser_context browser.new_context() browser_context.add_init_script(pathstealth_js_path) context_page browser_context.new_page() context_page.goto(https://www.xiaohongshu.com) # 设置Cookie并重新加载 browser_context.add_cookies([ {name: a1, value: a1, domain: .xiaohongshu.com, path: /} ]) context_page.reload() sleep(1) # 调用Web端的签名函数 encrypt_params context_page.evaluate( ([url, data]) window._webmsxyw(url, data), [uri, data] ) return { x-s: encrypt_params[X-s], x-t: str(encrypt_params[X-t]) } except Exception: pass raise Exception(签名失败)客户端架构设计xhs项目的核心是XhsClient类位于xhs/core.py中。该类的设计遵循了以下原则会话管理通过requests.Session维护持久连接请求封装统一的request方法处理所有HTTP请求异常处理完整的异常体系在xhs/exception.py中定义数据转换自动处理JSON键名的驼峰式转下划线式class XhsClient: def __init__(self, cookieNone, user_agentNone, timeout10, proxiesNone, signNone): self.session requests.Session() self.timeout timeout self.proxies proxies self.sign sign if cookie: self.cookie cookie if user_agent: self.session.headers.update({User-Agent: user_agent})内容数据分析的实战应用方案用户行为数据采集与分析通过get_user_notes和get_user_all_notes方法可以获取用户的所有笔记数据实现用户行为分析# 获取用户笔记数据 def analyze_user_content_pattern(user_id): xhs_client XhsClient(cookie, signsign) # 获取用户所有笔记 all_notes xhs_client.get_user_all_notes(user_id, crawl_interval2) # 分析内容类型分布 content_types {} for note in all_notes: note_type note.get(type, unknown) content_types[note_type] content_types.get(note_type, 0) 1 # 分析发布时间规律 publish_times [] for note in all_notes: publish_time note.get(time, ) if publish_time: publish_times.append(parse_time(publish_time)) return { total_notes: len(all_notes), content_distribution: content_types, publish_pattern: analyze_time_pattern(publish_times) }内容推荐系统的实现FeedType枚举类定义了多种内容推荐类型支持按兴趣领域获取精准内容from xhs import FeedType def get_personalized_feed(user_interests): xhs_client XhsClient(cookie, signsign) # 根据用户兴趣获取不同类型的内容 feeds {} for interest in user_interests: feed_type get_feed_type_by_interest(interest) if feed_type: feeds[interest] xhs_client.get_home_feed(feed_type) return feeds def get_feed_type_by_interest(interest): # 映射兴趣到FeedType mapping { fashion: FeedType.FASION, food: FeedType.FOOD, cosmetics: FeedType.COSMETICS, travel: FeedType.TRAVEL, fitness: FeedType.FITNESS } return mapping.get(interest.lower())内容创作与管理的自动化实现多媒体内容上传与发布xhs项目支持图片和视频内容的上传与发布通过upload_file和create_note方法实现def publish_content_with_media(title, description, media_files, tagsNone): xhs_client XhsClient(cookie, signsign) # 获取上传许可 file_type image if media_files[0].endswith((.jpg, .png)) else video file_id, token xhs_client.get_upload_files_permit(file_type, len(media_files)) # 上传文件 uploaded_files [] for file_path in media_files: if file_type image: upload_result xhs_client.upload_file(file_id, token, file_path) else: upload_result xhs_client.upload_file_with_slice(file_id, token, file_path) uploaded_files.append(upload_result) # 创建笔记 note_info { title: title, desc: description, note_type: normal if file_type image else video, ats: tags or [], image_info: uploaded_files if file_type image else None, video_info: uploaded_files if file_type video else None } return xhs_client.create_note(**note_info)定时发布与批量管理通过post_time参数实现内容的定时发布结合批量操作实现高效的内容管理def schedule_content_publishing(content_list): xhs_client XhsClient(cookie, signsign) results [] for content in content_list: # 计算发布时间未来时间 publish_time calculate_publish_time(content[schedule]) # 准备内容数据 note_data { title: content[title], desc: content[description], note_type: content[type], post_time: publish_time, is_private: content.get(private, False) } # 添加多媒体文件 if content.get(images): note_data[image_info] prepare_image_info(content[images]) elif content.get(video): note_data[video_info] prepare_video_info(content[video]) # 创建定时笔记 result xhs_client.create_note(**note_data) results.append({ content_id: content[id], note_id: result.get(note_id), scheduled_time: publish_time, status: scheduled if result else failed }) return results性能优化与错误处理策略请求频率控制与重试机制在xhs/core.py的request方法中实现了智能的重试机制和频率控制def request(self, method, url, **kwargs): # 添加签名参数 if self.sign and not kwargs.get(quick_sign, False): headers self._pre_headers(url, kwargs.get(data, None)) kwargs[headers] {**kwargs.get(headers, {}), **headers} # 执行请求 response self.session.request( methodmethod, urlurl, timeoutself.timeout, proxiesself.proxies, **kwargs ) # 处理响应 if response.status_code ! 200: self._handle_error_response(response) return response异常处理体系xhs/exception.py中定义了完整的异常类体系确保程序的健壮性异常类型触发条件处理建议DataFetchError数据获取失败检查网络连接和签名参数IPBlockErrorIP被限制访问更换代理或等待限制解除NeedVerifyError需要验证码验证触发验证流程或使用备用账号SignError签名生成失败检查签名函数和Cookie有效性try: note xhs_client.get_note_by_id(note_id, xsec_token) print(json.dumps(note, indent4)) except DataFetchError as e: print(f数据获取失败: {e}) # 实现重试逻辑 retry_count 0 while retry_count 3: try: note xhs_client.get_note_by_id(note_id, xsec_token) break except DataFetchError: retry_count 1 sleep(2 ** retry_count) # 指数退避系统架构扩展与集成方案微服务架构集成xhs项目可以轻松集成到微服务架构中通过xhs-api/app.py提供的RESTful API接口from flask import Flask, request, jsonify from xhs import XhsClient app Flask(__name__) # 初始化客户端池 clients_pool {} app.route(/api/notes/note_id, methods[GET]) def get_note(note_id): user_id request.headers.get(X-User-ID) client get_or_create_client(user_id) try: xsec_token request.args.get(xsec_token, ) note client.get_note_by_id(note_id, xsec_token) return jsonify({ success: True, data: note }) except Exception as e: return jsonify({ success: False, error: str(e) }), 500 def get_or_create_client(user_id): if user_id not in clients_pool: # 从数据库或配置获取用户凭证 credentials get_user_credentials(user_id) clients_pool[user_id] XhsClient( cookiecredentials[cookie], signsign_function ) return clients_pool[user_id]数据持久化与缓存策略结合数据库和缓存系统实现数据的高效存储和快速访问import redis from datetime import timedelta class XhsDataService: def __init__(self, redis_client, db_session): self.redis redis_client self.db db_session self.xhs_client XhsClient(cookie, signsign) def get_note_with_cache(self, note_id, xsec_token): # 检查缓存 cache_key fnote:{note_id} cached_data self.redis.get(cache_key) if cached_data: return json.loads(cached_data) # 从API获取 note_data self.xhs_client.get_note_by_id(note_id, xsec_token) # 存储到缓存和数据库 self.redis.setex(cache_key, timedelta(hours1), json.dumps(note_data)) self.save_to_database(note_data) return note_data def get_user_notes_batch(self, user_id, cursor): # 批量获取用户笔记 notes self.xhs_client.get_user_notes(user_id, cursor) # 异步处理数据 self.process_notes_async(notes) return notes安全合规与最佳实践建议请求频率限制与合规使用为了避免对小红书平台造成压力建议实施以下限制策略请求间隔控制在get_user_all_notes等方法中设置crawl_interval参数并发限制限制同时进行的API请求数量错误退避实现指数退避算法处理失败请求class RateLimitedXhsClient(XhsClient): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.request_times [] self.max_requests_per_minute 30 def request(self, method, url, **kwargs): # 检查请求频率 current_time time.time() self.request_times [t for t in self.request_times if current_time - t 60] if len(self.request_times) self.max_requests_per_minute: sleep_time 60 - (current_time - self.request_times[0]) time.sleep(sleep_time) # 记录请求时间 self.request_times.append(current_time) return super().request(method, url, **kwargs)数据使用伦理指南在使用xhs项目进行数据采集和分析时应遵守以下伦理准则尊重用户隐私仅收集公开数据不获取用户隐私信息遵守平台规则不进行恶意爬取或干扰平台正常运行数据使用透明明确告知数据来源和使用目的商业用途合规获得必要授权后再进行商业化使用部署与监控方案容器化部署配置通过Docker容器化部署确保环境一致性和可扩展性FROM python:3.9-slim WORKDIR /app # 安装系统依赖 RUN apt-get update apt-get install -y \ wget \ gnupg \ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ echo deb http://dl.google.com/linux/chrome/deb/ stable main /etc/apt/sources.list.d/google.list \ apt-get update apt-get install -y google-chrome-stable \ rm -rf /var/lib/apt/lists/* # 安装Python依赖 COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 复制应用代码 COPY . . # 运行应用 CMD [python, xhs-api/app.py]监控与日志系统集成监控系统实时跟踪API使用情况和性能指标import logging from prometheus_client import Counter, Histogram # 定义监控指标 REQUEST_COUNT Counter(xhs_requests_total, Total API requests) REQUEST_DURATION Histogram(xhs_request_duration_seconds, Request duration) class MonitoredXhsClient(XhsClient): def request(self, method, url, **kwargs): # 记录请求开始时间 start_time time.time() try: REQUEST_COUNT.inc() response super().request(method, url, **kwargs) return response finally: # 记录请求耗时 duration time.time() - start_time REQUEST_DURATION.observe(duration) # 记录日志 logging.info(fRequest {method} {url} completed in {duration:.2f}s)总结与未来发展方向xhs项目为小红书平台的数据获取和内容管理提供了完整的技术解决方案。通过深入分析Web端通信协议项目实现了稳定的API接口解决了反爬虫机制带来的挑战。在实际应用中开发者应重点关注以下几个方面签名算法的维护随着平台更新需要持续跟踪签名算法的变化请求频率优化平衡数据获取需求和平台限制错误处理完善建立完善的异常恢复机制数据质量保证确保采集数据的准确性和完整性未来xhs项目可以在以下方向进行扩展支持更多小红书API接口提供更丰富的数据分析工具开发图形化管理和监控界面集成机器学习算法进行内容推荐分析通过合理使用xhs项目开发者和内容运营团队能够实现数据驱动的内容策略提升运营效率和决策质量。项目的开源特性也促进了技术社区的协作与创新为小红书生态系统的技术发展提供了有力支持。【免费下载链接】xhs基于小红书 Web 端进行的请求封装。https://reajason.github.io/xhs/项目地址: https://gitcode.com/gh_mirrors/xh/xhs创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考