diff --git a/pyproject.toml b/pyproject.toml index 6c6c3e1..2aafd03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,12 +14,12 @@ dependencies = [ "click>=8.3.1", "emoji>=2.15.0", "fastapi>=0.128.0", - "fastmcp>=2.14.3", + "fastmcp>=2.14.4", "httpx[socks]>=0.28.1", "lxml>=6.0.2", "pyperclip>=1.11.0", "pyyaml>=6.0.3", - "textual>=7.3.0", + "textual>=7.4.0", "uvicorn>=0.40.0", "websockets>=16.0", "xhshow>=0.1.8", diff --git a/requirements.txt b/requirements.txt index 12ecbc9..cbadea7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ emoji==2.15.0 # via xhs-downloader (pyproject.toml) fastapi==0.128.0 # via xhs-downloader (pyproject.toml) -fastmcp>=2.14.3 +fastmcp>=2.14.4 # via xhs-downloader (pyproject.toml) httpx[socks]==0.28.1 # via xhs-downloader (pyproject.toml) @@ -20,7 +20,7 @@ pyperclip==1.11.0 # via xhs-downloader (pyproject.toml) pyyaml==6.0.3 # via xhs-downloader (pyproject.toml) -textual==7.3.0 +textual==7.4.0 # via xhs-downloader (pyproject.toml) uvicorn==0.40.0 # via xhs-downloader (pyproject.toml) diff --git a/static/Release_Notes.md b/static/Release_Notes.md index 6ed56e7..21d2892 100644 --- a/static/Release_Notes.md +++ b/static/Release_Notes.md @@ -13,7 +13,7 @@ **用户脚本更新内容:** -**版本号:2.2.7** +**版本号:2.3.0** 1. 新增链接提取/图片下载选择模式开关 2. 修复合辑作品链接提取失败的问题 @@ -22,4 +22,5 @@ 5. 新增图文作品文件下载格式设置 6. 修复视频作品下载功能 7. 优化用户脚本兼容性 -8. 重构数据处理逻辑 +8. 新增英语语言支持 +9. 重构数据处理逻辑 diff --git a/static/XHS-Downloader.js b/static/XHS-Downloader.js index 0432154..97b8bf6 100644 --- a/static/XHS-Downloader.js +++ b/static/XHS-Downloader.js @@ -2,9 +2,10 @@ // @name XHS-Downloader // @namespace xhs_downloader // @homepage https://github.com/JoeanAmier/XHS-Downloader -// @version 2.2.7 +// @version 2.3.0 // @tag 小红书 // @tag RedNote +// @tag XiaoHongShu // @description 提取小红书作品/用户链接,下载小红书无水印图文/视频作品文件 // @description:en Extract RedNote works/user links, Download watermark-free images/videos files // @author JoeanAmier @@ -31,6 +32,274 @@ (function () { 'use strict'; + const i18n = { + 'CN': { + instructionsText: `功能清单: +1. 下载小红书无水印作品文件 +2. 提取推荐页面作品链接 +3. 提取账号发布作品链接 +4. 提取账号收藏作品链接 +5. 提取账号专辑作品链接 +6. 提取账号点赞作品链接 +7. 提取搜索结果作品链接 +8. 提取搜索结果用户链接 + +注意事项: +1. 下载小红书无水印作品文件时,脚本需要花费时间处理文件,请等待片刻,请勿多次点击下载按钮 +2. 提取账号发布、收藏、点赞、专辑作品链接时,脚本可以自动滚动页面直至加载全部作品 +3. 提取推荐作品链接、搜索作品、用户链接时,脚本可以自动滚动指定次数加载更多内容,默认滚动次数:50 次 +4. 自动滚动页面功能默认关闭;用户可以自由开启,并修改滚动页面次数,修改后立即生效 +5. 如果未开启自动滚动页面功能,用户需要手动滚动页面以便加载更多内容后再进行其他操作 +6. 支持作品文件打包下载;该功能默认开启,多个文件的作品将会以压缩包格式下载 +7. 向服务器推送下载任务时,文件格式、名称规则等设置以服务器配置文件中的设置为准 +8. 使用全局代理工具可能会导致脚本下载文件失败,如有异常,请尝试关闭代理工具,必要时向作者反馈 +9. XHS-Downloader 用户脚本仅实现可见即可得的数据采集功能,无任何收费功能和破解功能 + +项目开源地址:https://github.com/JoeanAmier/XHS-Downloader +`, + disclaimerText: `1. 使用者对本项目的使用由使用者自行决定,并自行承担风险。作者对使用者使用本项目所产生的任何损失、责任、或风险概不负责。 +2. 本项目的作者提供的代码和功能是基于现有知识和技术的开发成果。作者按现有技术水平努力确保代码的正确性和安全性,但不保证代码完全没有错误或缺陷。 +3. 本项目依赖的所有第三方库、插件或服务各自遵循其原始开源或商业许可,使用者需自行查阅并遵守相应协议,作者不对第三方组件的稳定性、安全性及合规性承担任何责任。 +4. 使用者在使用本项目时必须严格遵守 GNU General Public License v3.0 的要求,并在适当的地方注明使用了 GNU General Public License v3.0 的代码。 +5. 使用者在使用本项目的代码和功能时,必须自行研究相关法律法规,并确保其使用行为合法合规。任何因违反法律法规而导致的法律责任和风险,均由使用者自行承担。 +6. 使用者不得使用本工具从事任何侵犯知识产权的行为,包括但不限于未经授权下载、传播受版权保护的内容,开发者不参与、不支持、不认可任何非法内容的获取或分发。 +7. 本项目不对使用者涉及的数据收集、存储、传输等处理活动的合规性承担责任。使用者应自行遵守相关法律法规,确保处理行为合法正当;因违规操作导致的法律责任由使用者自行承担。 +8. 使用者在任何情况下均不得将本项目的作者、贡献者或其他相关方与使用者的使用行为联系起来,或要求其对使用者使用本项目所产生的任何损失或损害负责。 +9. 本项目的作者不会提供 XHS-Downloader 项目的付费版本,也不会提供与 XHS-Downloader 项目相关的任何商业服务。 +10. 基于本项目进行的任何二次开发、修改或编译的程序与原创作者无关,原创作者不承担与二次开发行为或其结果相关的任何责任,使用者应自行对因二次开发可能带来的各种情况负全部责任。 +11. 本项目不授予使用者任何专利许可;若使用本项目导致专利纠纷或侵权,使用者自行承担全部风险和责任。未经作者或权利人书面授权,不得使用本项目进行任何商业宣传、推广或再授权。 +12. 作者保留随时终止向任何违反本声明的使用者提供服务的权利,并可能要求其销毁已获取的代码及衍生作品。 +13. 作者保留在不另行通知的情况下更新本声明的权利,使用者持续使用即视为接受修订后的条款。 + +在使用本项目的代码和功能之前,请您认真考虑并接受以上免责声明。如果您对上述声明有任何疑问或不同意,请不要使用本项目的代码和功能。如果您使用了本项目的代码和功能,则视为您已完全理解并接受上述免责声明,并自愿承担使用本项目的一切风险和后果。 +`, + readmeTitle: 'XHS-Downloader 脚本说明', + disclaimerTitle: 'XHS-Downloader 免责声明', + disclaimerConfirm: '我已知晓', + readmeMenuTitle: "阅读脚本说明和免责声明", + aboutText: `项目开源协议:GNU General Public License v3.0 +项目开源地址:https://github.com/JoeanAmier/XHS-Downloader + +如果 XHS-Downloader 对您有帮助,请考虑为它点个 Star ⭐,感谢您的支持! + +✨ 作者的其他开源项目: + +DouK-Downloader(抖音、DouYin、TikTok):https://github.com/JoeanAmier/TikTokDownloader +KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Downloader + +项目 Discord 社区:https://discord.com/invite/ZYtmgKud9Y +`, + aboutTitle: '关于 XHS-Downloader', + errorTitle: '发生异常', + errorText: (text) => `${text}请向作者反馈!\n项目开源地址:https://github.com/JoeanAmier/XHS-Downloader`, + imageExtractError: "解析图文作品数据发生异常!", + downloadLinkError: "处理下载链接发生异常!", + downloadTips: "正在下载文件,请稍等...", + downloadError: "下载作品文件发生异常!", + extractError: "读取作品数据发生异常!", + linkExtractSuccess: '作品/用户链接已复制到剪贴板!', + linkExtractError: "未提取到任何作品/用户链接!", + videoDownloadError: "下载视频作品文件发生异常!", + imageDownloadError: "下载图文作品文件发生异常!", + signInPrompt: "提取作品链接失败!受平台限制,未登录状态下无法通过账号主页浏览作品详情!请登录后重试!", + jsZipError: "XHS-Downloader 用户脚本依赖库 JSZip 加载失败,作品文件打包下载功能无法使用,请尝试刷新网页或者向作者反馈!", + tipsTitle: '脚本提示', + confirmButton: '确认', + closeButton: '关闭', + autoScrollLabel: '自动滚动页面', + autoScrollDesc: '启用后,页面将根据规则自动滚动以便加载更多内容', + filePackLabel: '文件打包下载', + filePackDesc: '启用后,多个文件的作品将会以压缩包格式下载', + scrollCountLabel: '自动滚动次数', + scrollCountDesc: '自动滚动页面的次数(仅在启用自动滚动页面时可用)', + linkCheckboxSwitchLabel: '链接提取选择模式', + linkCheckboxSwitchDesc: '关闭后,提取作品链接时无需确认直接提取全部链接', + imageCheckboxSwitchLabel: '图片下载选择模式', + imageCheckboxSwitchDesc: '关闭后,下载图文作品时无需确认直接下载全部文件', + keepMenuVisibleLabel: '菜单保持显示', + keepMenuVisibleDesc: '启用后,功能菜单无需鼠标悬停始终保持显示', + scriptServerURLLabel: 'WebSocket 服务器地址', + scriptServerURLDesc: '用户脚本连接的 WebSocket 服务器', + scriptServerSwitchLabel: '连接服务器', + scriptServerSwitchDesc: '启用后,可以把作品下载任务推送至服务器', + imageDownloadFormatLabel: '图片下载格式', + imageDownloadFormatDesc: '图文作品文件下载格式', + saveSettingsButton: '保存设置', + cancelSettingsButton: '放弃修改', + selectAllButton: '全部选中', + deselectAllButton: '全部取消', + startDownloadButton: '开始下载', + closeDownloadButton: '取消下载', + imageSelectionTip: '请至少选择一张图片!', + itemsExtractTip: '请选择需要提取的项目', + itemsExtractConfirm: '提取链接', + itemsExtractCancel: '放弃', + extractRecommendLinksText: '提取推荐作品链接', + extractRecommendLinksDescription: '提取推荐页面的作品链接至剪贴板', + downloadNoteFilesText: '下载作品文件', + downloadNoteFilesDescription: '下载当前作品的无水印文件', + pushDownloadTaskText: '推送下载任务', + pushDownloadTaskDescription: '向服务器发送下载请求', + extractPublishedLinksText: '提取发布作品链接', + extractPublishedLinksDescription: '提取账号发布作品链接至剪贴板', + extractLikedLinksText: '提取点赞作品链接', + extractLikedLinksDescription: '提取账号点赞作品链接至剪贴板', + extractSavedLinksText: '提取收藏作品链接', + extractSavedLinksDescription: '提取账号收藏作品链接至剪贴板', + extractSearchNoteLinksText: '提取作品链接', + extractSearchNoteLinksDescription: '提取搜索结果的作品链接至剪贴板', + extractSearchUsersLinksText: '提取用户链接', + extractSearchUsersLinksDescription: '提取搜索结果的用户链接至剪贴板', + extractAlbumNotesLinksText: '提取专辑作品链接', + extractAlbumNotesLinksDescription: '提取当前专辑的作品链接至剪贴板', + modifyScriptSettingsText: '修改用户脚本设置', + modifyScriptSettingsDescription: '修改用户脚本设置', + aboutXHSText: '关于 XHS-Downloader', + aboutXHSDescription: '查看 XHS-Downloader 更多信息', + imageCheckboxTitle: '请选中需要下载的图片', + scriptServerError: '脚本服务器连接出错,请检查网络连接或脚本服务器状态是否正常!', + pushTaskError: '脚本服务器未连接,请检查网络连接或脚本服务器状态是否正常!', + pushTaskSuccess: "已向服务器发送下载请求", + settingsTitle: '用户脚本设置', + }, 'EN': { + instructionsText: `Features: +1. Download RedNote watermark-free note files +2. Extract note links from the Recommendation page +3. Extract note links from an account's Published tab +4. Extract note links from an account's Collections tab +5. Extract note links from an account's Albums +6. Extract note links from an account's Liked tab +7. Extract note links from search results +8. Extract user links from search results + +Notes: +1. When downloading watermark-free note files, the script needs time to process. Please wait a moment and do not click the download button repeatedly. +2. When extracting links from Published, Collections, Liked, or Albums, the script can automatically scroll the page until all notes are loaded. +3. When extracting Recommendation, Search Notes, or User links, the script can automatically scroll a specified number of times. Default: 50 times. +4. Auto-scroll is disabled by default; users can enable it and modify the scroll count. Changes take effect immediately. +5. If auto-scroll is disabled, users must manually scroll the page to load more content before performing extractions. +6. Supports batch downloading (ZIP format); this feature is enabled by default. Notes with multiple files will be downloaded as a compressed package. +7. When pushing tasks to a server, settings such as file format and naming rules are determined by the server's configuration file. +8. Using global proxy tools may cause download failures. If issues occur, try disabling the proxy and provide feedback to the author if necessary. +9. The XHS-Downloader userscript only provides "what you see is what you get" data collection; it contains no paid features or decryption/cracking functions. + +Open Source: https://github.com/JoeanAmier/XHS-Downloader +`, + disclaimerText: `1. The use of this project is at the user's own discretion and risk. The author is not responsible for any loss, liability, or risk arising from its use. +2. The code and functions provided are based on existing knowledge and technology. While efforts are made to ensure correctness and security, the author does not guarantee that the code is entirely error-free. +3. All third-party libraries, plugins, or services relied upon by this project follow their own original open-source or commercial licenses. Users must consult and comply with those agreements. +4. Users must strictly adhere to the GNU General Public License v3.0 requirements and credit the use of GPL v3.0 code where appropriate. +5. Users must research relevant laws and regulations to ensure their use of this project is legal and compliant. Any legal liability arising from violations is borne solely by the user. +6. Users must not use this tool for any acts that infringe on intellectual property rights, including but not limited to unauthorized downloading or distribution of copyrighted content. +7. This project assumes no responsibility for the compliance of data collection, storage, or transmission activities performed by the user. +8. Under no circumstances shall the author or contributors be held liable for any damages or losses related to the user's actions. +9. The author will not provide a paid version of XHS-Downloader, nor any commercial services related to the project. +10. Any secondary development, modification, or compilation of this program is unrelated to the original author. The user is solely responsible for any consequences of such actions. +11. This project does not grant any patent licenses. The user assumes all risks regarding patent disputes. Commercial promotion or sub-licensing without written authorization is prohibited. +12. The author reserves the right to terminate service to any user violating this disclaimer and may request the destruction of obtained code. +13. The author reserves the right to update this disclaimer without notice. Continued use constitutes acceptance of the revised terms. + +Before using this project, please carefully consider and accept the above disclaimer. If you have any doubts or disagree, do not use the code or functions. Use of the project implies full understanding and acceptance of these terms. +`, + readmeTitle: 'XHS-Downloader Instructions', + disclaimerTitle: 'XHS-Downloader Disclaimer', + disclaimerConfirm: 'I acknowledge', + readmeMenuTitle: "Read Instructions and Disclaimer", + aboutText: `License: GNU General Public License v3.0 +GitHub: https://github.com/JoeanAmier/XHS-Downloader + +If XHS-Downloader helps you, please consider giving it a Star ⭐. Thanks for your support! + +✨ Other Projects by the Author: + +DouK-Downloader (DouYin, TikTok): https://github.com/JoeanAmier/TikTokDownloader +KS-Downloader (KuaiShou): https://github.com/JoeanAmier/KS-Downloader + +Discord Community: https://discord.com/invite/ZYtmgKud9Y +`, + aboutTitle: 'About XHS-Downloader', + errorTitle: 'Exception Occurred', + errorText: (text) => `${text} Please report this to the author!\nGitHub: https://github.com/JoeanAmier/XHS-Downloader`, + imageExtractError: "Error parsing image note data!", + downloadLinkError: "Error processing download links!", + downloadTips: "Downloading file, please wait...", + downloadError: "Error downloading note files!", + extractError: "Error reading note data!", + linkExtractSuccess: 'Note/User links copied to clipboard!', + linkExtractError: "No Note/User links extracted!", + videoDownloadError: "Error downloading video note!", + imageDownloadError: "Error downloading image note!", + signInPrompt: "Failed to extract links! Due to platform restrictions, note details cannot be viewed via account pages without logging in. Please log in and try again!", + jsZipError: "JSZip library failed to load. ZIP packaging is unavailable. Please refresh or contact the author!", + tipsTitle: 'Script Tips', + confirmButton: 'Confirm', + closeButton: 'Close', + autoScrollLabel: 'Auto-scroll Page', + autoScrollDesc: 'When enabled, the page will automatically scroll to load more content', + filePackLabel: 'Package Files for Download', + filePackDesc: 'When enabled, notes with multiple files will be downloaded as a ZIP archive', + scrollCountLabel: 'Auto-scroll Count', + scrollCountDesc: 'Number of times to scroll (only active when Auto-scroll is enabled)', + linkCheckboxSwitchLabel: 'Link Extraction Selection Mode', + linkCheckboxSwitchDesc: 'If disabled, all links will be extracted immediately without confirmation', + imageCheckboxSwitchLabel: 'Image Download Selection Mode', + imageCheckboxSwitchDesc: 'If disabled, all images will be downloaded immediately without confirmation', + keepMenuVisibleLabel: 'Keep Menu Visible', + keepMenuVisibleDesc: 'When enabled, the menu stays visible without needing a mouse hover', + scriptServerURLLabel: 'WebSocket Server URL', + scriptServerURLDesc: 'The WebSocket server address the script connects to', + scriptServerSwitchLabel: 'Connect to Server', + scriptServerSwitchDesc: 'When enabled, download tasks can be pushed to the server', + imageDownloadFormatLabel: 'Image Download Format', + imageDownloadFormatDesc: 'Preferred file format for downloading images', + saveSettingsButton: 'Save Settings', + cancelSettingsButton: 'Discard Changes', + selectAllButton: 'Select All', + deselectAllButton: 'Deselect All', + startDownloadButton: 'Start Download', + closeDownloadButton: 'Cancel Download', + imageSelectionTip: 'Please select at least one image!', + itemsExtractTip: 'Please select items to extract', + itemsExtractConfirm: 'Extract Links', + itemsExtractCancel: 'Cancel', + extractRecommendLinksText: 'Extract Recommended Note Links', + extractRecommendLinksDescription: '', + downloadNoteFilesText: 'Download Note Files', + downloadNoteFilesDescription: '', + pushDownloadTaskText: 'Push Download Task', + pushDownloadTaskDescription: 'Send download request to the server', + extractPublishedLinksText: 'Extract Published Note Links', + extractPublishedLinksDescription: '', + extractLikedLinksText: 'Extract Liked Note Links', + extractLikedLinksDescription: '', + extractSavedLinksText: 'Extract Collected Note Links', + extractSavedLinksDescription: '', + extractSearchNoteLinksText: 'Extract Note Links', + extractSearchNoteLinksDescription: 'Extract note links from search results', + extractSearchUsersLinksText: 'Extract User Links', + extractSearchUsersLinksDescription: 'Extract user links from search results', + extractAlbumNotesLinksText: 'Extract Album Note Links', + extractAlbumNotesLinksDescription: 'Extract note links from the current album', + modifyScriptSettingsText: 'Modify Script Settings', + modifyScriptSettingsDescription: '', + aboutXHSText: 'About XHS-Downloader', + aboutXHSDescription: '', + imageCheckboxTitle: 'Please select images to download', + scriptServerError: 'Server connection error. Please check your network or server status!', + pushTaskError: 'Server not connected. Please check your network or server status!', + pushTaskSuccess: "Download request sent to server successfully", + settingsTitle: 'Script Settings', + }, + }; + + let lang = GM_getValue("language", undefined); + if (!lang) { + lang = navigator.language.toLowerCase().includes('zh') ? 'CN' : 'EN'; + GM_setValue("language", lang); + } + + let t = i18n[lang]; + const iconBase64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAEIUExURUdwTPNIRO5CPug8OO5CPfhLRPxGROk8OP9XU/NHQ/FEQOg8OO9DP+c6Nug7N+5BPe1APPFFQO9DPvVIROc7NuU5Nek8OPNGQu9CPvJFQek8OO9CPuk8OO9CPuU4NO5CPuU4NO9CPv///uU5Nf///9YqJtQoJOQ4NPizsf/599UvK++Rj+BXVP/r6uh3dOM2Mt4yLuk9OdwvK9crJ+2LieNkYdcsKOE0MPasqtpEQPOgnuNrZ9czL+uBftotKfSlo+FeW+yHhOdzcPGdmvCUkfq6uOl9et1LR+ZwbfGYlv/n5vzBv/7Rz+t5dtk7N9EkIP3Hxf/i4N5STv/08v/b2cwfG//v7v/8+vNjnHUAAAAidFJOUwAVnPOIDgf7Ai9S1Ui+5GpyX6gizKvrPbR7k8Dez9zd9+hDReWtAAAHR0lEQVR42sWbCVuiXBiGj/ta5m5m00wH0NQUFBAX3Nc0y7b5///kO/g1nSRZRIT76rpy4g1uznmfIyMEjOENhCPubDJ5hkgms+5IMOABFuEIX8ZufDCPgBB9IbavmT8Zd9ABTos37L72QRWYG2fQc7KjB2MuqANfJnoKh7TTBXXji4X95p589JqBh5G7MG8YPBfn0AAut8Ocs79IQYQxheNHwR/NwSNIRY7shcAZPJJQ+pjRd/vg0TBOj+HTD0FTOA8bm/0LHzQJxu01kL0MNJFE/ODhz0FTSR3Yi2EXNBkmCg4g4oOmw7j1LwmXDDwFTp0GfjcDT0NSXxjc8GQk/QbG3+pZiDDwhOTdQIOgD54UJqKx/rjgiWHCQAVHDp4cV1wlgGfQAkIe5QBAS3ACBdI+aAlMEOzFk4MWkXJYvQLKyexNIJ4AWybBn4AWcv4zCRFoKe4fHZiCluKL29OBmJhsDXZBi/EF5ANg6xB48ADY0wUXUJNqg6ZrW2i6UYV7yFdlFRpkwRf+nMbB6Vq9+DJkW0KhILTY+Qtfr9HVXb0aT87mg5FU0StVyh1coYQLrwVhqArdmQsPxA4bYd7p0tV/fl2ea73tVtwXHtd0HqqBL44y6udfJiRuv0FIPA/5WlU6PMlN9lcMG1CN668M+qAajTLe9+4h/i7WjUaH/SAUCh5pqAYTwKuwhsAtRubAd6XJUdhcofWtx1fKoy+hLIAMKPIebVUUqEpAJXJ+jRlozJrNWZM2LlBbS3tQ7oQAkIhCJboEYsJ/ChDfkAns3Y4E+AWB6EAlLoFEDCpB3qFfL5D/CxAfC3HO9bnhoLeSDrYrQCBWAjtEBe3peEP8L0CWCERRMY1XAOFPqQncYoH2E/kPasaiTVgAvViUqa/NTzMsgL4pC/iktSgOdQqs2mihE3oLsd+hyKfSrkDhnaSK5cdxSxBGbHuiUwCGcQuoCsjn+KFXud8VuJuONgRGWwAH0alLQJ7/fT0gL8MCqpfH15oChmOoLfAH9aBLU8BwDLUFGAfuQc0mfO2xlXl7Ph0X3vZPwWayEIftdmXQetDbAzCM34r1xxBRXtzKYtjjitRXDJt6BfIRENEtsOxPS6PWgh2+8CT5PtoVmLxLq8N8sGiNxiInaArgGLh1C3zjbdGWx3BeWhmIYT6JUmhnDOEZSEI7Y5gPgTNoZwzhOUjoj6GwECvDKdtaPuyfgvvnHjsdVsSScK+7B1zgl24B7iuGVKfdI2QxLMw7BmIIfx8gUHiZD8ZjVuSaFIphb1fgWYrhmpuy4/GgUh7pFoAHCHxjxfYfZDFsi893uOAUAhhCKYbE4THMg5A9McQ9kLA1hvmU/nWAuJu0SqI4WAir1/1TcLcqLFhRZEeFD9098AskdQv0cQzXlYI8hstp08i7YQJkdQsITW46GIjDcoeqk+/CrsDqnaxTnfJcHAym7RmrewSS4MJADF+X07I8hv3K5MNADLMgaG8ML0DA3nfDIPD67BSAAQBu7BTweQGI2Slwje/TqAqgbzJ+CPysIHQIOJFAWocA4mHZGgzbHIcu+6UrEgksQPy7HqmgCm4ojiYbAvGoKRAFAHWhhkC9v1n0ixRZr9fJLXWSKvYXbwRiK4DYtDipgpTYFlJkmX175DUEmDhAXGkIdOmutMcmJ/23oDcqTftNyYZaD5ADWf8g7ktNSqpY9x/ZUa/XGovctqJL1zQEboDEpYbAE8/3Rytih9WoT9V56mVZqxX6FF+nXsbPf3cq3nrtIk9pCDiBREBd4JYtEFvkS2GBo/hatUp3qRfhDld8K1myr+oCQfxJsaLALd7zj9cfbLHbJR83+Mf7qpGAxqfFbmUBvF85n5+VCr3Xr3/sS6qqQAxs8QcYdYFtxiYDrlmkEJ0Zx04+sMM2joi7Zak961CIYrMvFrZJ1RAIgk+u1XoAsRo0yS7dqFa3dwWqDTTtTRZFAC9BD+MZ1aVRSV4qQRU1cj193joQigIpr9b9irrU2M/imqersn3kG3S92SM+KbyQtYa8AnVnZ7gkEB0FgSzQ+ricFp4r+LYAlDvUOuMNOvnWuis/OsQ3EtqTZU3jw3KEU/FOCT763u08haLYgJgDdnEFMKgNrScIvpGBlhPyA3uHIAh2yNg5APjpATufIHBCS7kCchwuu25d4+XQQrLA3mc4zj32PsXChG15kArjVHmUzN6HyeIpexKACSu0gXUPGF9a3gCWL4hnXqCK98yeBsR4Troe5eJAE0fohCsgOr6dBucBoAtHwp7xx3hO0omhONCNN3aC/DnAIZj9iD/j9ILDCLpMXf8j4GDiCRPbL23D31lhmJgHGMKfzkETSAVt/WMzxukAxxC4Oi4OiTQ4lnDoiOaL+sHx+KMGFc4jXmAO/qCBiQhFvcBEAk7XQQtPLO0HJuOJZnw6j34VwZ1vskMsBTVwZdDRT4g/cBG7YRQi/ydzmfYCC3CkI9lk4tdv+Mnv80QyGwkbOvP/AM/hIrquHOjjAAAAAElFTkSuQmCC"; const defaultsWebSocketURL = "ws://127.0.0.1:5558"; @@ -65,56 +334,16 @@ }; const readme = async () => { - const instructions = `功能清单: -1. 下载小红书无水印作品文件 -2. 提取推荐页面作品链接 -3. 提取账号发布作品链接 -4. 提取账号收藏作品链接 -5. 提取账号专辑作品链接 -6. 提取账号点赞作品链接 -7. 提取搜索结果作品链接 -8. 提取搜索结果用户链接 - -注意事项: -1. 下载小红书无水印作品文件时,脚本需要花费时间处理文件,请等待片刻,请勿多次点击下载按钮 -2. 提取账号发布、收藏、点赞、专辑作品链接时,脚本可以自动滚动页面直至加载全部作品 -3. 提取推荐作品链接、搜索作品、用户链接时,脚本可以自动滚动指定次数加载更多内容,默认滚动次数:50 次 -4. 自动滚动页面功能默认关闭;用户可以自由开启,并修改滚动页面次数,修改后立即生效 -5. 如果未开启自动滚动页面功能,用户需要手动滚动页面以便加载更多内容后再进行其他操作 -6. 支持作品文件打包下载;该功能默认开启,多个文件的作品将会以压缩包格式下载 -7. 向服务器推送下载任务时,文件格式、名称规则等设置以服务器配置文件中的设置为准 -8. 使用全局代理工具可能会导致脚本下载文件失败,如有异常,请尝试关闭代理工具,必要时向作者反馈 -9. XHS-Downloader 用户脚本仅实现可见即可得的数据采集功能,无任何收费功能和破解功能 - -项目开源地址:https://github.com/JoeanAmier/XHS-Downloader -` - const disclaimer_content = `1. 使用者对本项目的使用由使用者自行决定,并自行承担风险。作者对使用者使用本项目所产生的任何损失、责任、或风险概不负责。 -2. 本项目的作者提供的代码和功能是基于现有知识和技术的开发成果。作者按现有技术水平努力确保代码的正确性和安全性,但不保证代码完全没有错误或缺陷。 -3. 本项目依赖的所有第三方库、插件或服务各自遵循其原始开源或商业许可,使用者需自行查阅并遵守相应协议,作者不对第三方组件的稳定性、安全性及合规性承担任何责任。 -4. 使用者在使用本项目时必须严格遵守 GNU General Public License v3.0 的要求,并在适当的地方注明使用了 GNU General Public License v3.0 的代码。 -5. 使用者在使用本项目的代码和功能时,必须自行研究相关法律法规,并确保其使用行为合法合规。任何因违反法律法规而导致的法律责任和风险,均由使用者自行承担。 -6. 使用者不得使用本工具从事任何侵犯知识产权的行为,包括但不限于未经授权下载、传播受版权保护的内容,开发者不参与、不支持、不认可任何非法内容的获取或分发。 -7. 本项目不对使用者涉及的数据收集、存储、传输等处理活动的合规性承担责任。使用者应自行遵守相关法律法规,确保处理行为合法正当;因违规操作导致的法律责任由使用者自行承担。 -8. 使用者在任何情况下均不得将本项目的作者、贡献者或其他相关方与使用者的使用行为联系起来,或要求其对使用者使用本项目所产生的任何损失或损害负责。 -9. 本项目的作者不会提供 XHS-Downloader 项目的付费版本,也不会提供与 XHS-Downloader 项目相关的任何商业服务。 -10. 基于本项目进行的任何二次开发、修改或编译的程序与原创作者无关,原创作者不承担与二次开发行为或其结果相关的任何责任,使用者应自行对因二次开发可能带来的各种情况负全部责任。 -11. 本项目不授予使用者任何专利许可;若使用本项目导致专利纠纷或侵权,使用者自行承担全部风险和责任。未经作者或权利人书面授权,不得使用本项目进行任何商业宣传、推广或再授权。 -12. 作者保留随时终止向任何违反本声明的使用者提供服务的权利,并可能要求其销毁已获取的代码及衍生作品。 -13. 作者保留在不另行通知的情况下更新本声明的权利,使用者持续使用即视为接受修订后的条款。 - -在使用本项目的代码和功能之前,请您认真考虑并接受以上免责声明。如果您对上述声明有任何疑问或不同意,请不要使用本项目的代码和功能。如果您使用了本项目的代码和功能,则视为您已完全理解并接受上述免责声明,并自愿承担使用本项目的一切风险和后果。 -` - await showTextModal({ - title: 'XHS-Downloader 脚本说明', text: instructions, mode: 'info', closeText: '关闭' + title: t.readmeTitle, text: t.instructionsText, mode: 'info', closeText: t.closeButton }); if (!config.disclaimer) { showTextModal({ - title: 'XHS-Downloader 免责声明', - text: disclaimer_content, + title: t.disclaimerTitle, + text: t.disclaimerText, mode: 'confirm', - confirmText: '我已知晓', - closeText: '关闭' + confirmText: t.disclaimerConfirm, + closeText: t.closeButton }).then(answer => { GM_setValue("disclaimer", answer); config.disclaimer = answer; @@ -123,13 +352,19 @@ }; if (!config.disclaimer) { - readme(); + readme().then(); } console.info("用户接受 XHS-Downloader 免责声明", config.disclaimer) - GM_registerMenuCommand("阅读脚本说明和免责声明", function () { - readme(); + GM_registerMenuCommand(t.readmeMenuTitle, function () { + readme().then(); + }); + + GM_registerMenuCommand("切换语言/Switch language", function () { + lang = lang === "CN" ? "EN" : "CN"; + GM_setValue("language", lang); + t = i18n[lang]; }); const updatePackageDownloadFiles = (value) => { @@ -193,38 +428,21 @@ }; const about = () => { - const aboutText = `项目开源协议:GNU General Public License v3.0 -项目开源地址:https://github.com/JoeanAmier/XHS-Downloader - -如果 XHS-Downloader 对您有帮助,请考虑为它点个 Star ⭐,感谢您的支持! -If XHS-Downloader has been helpful to you, please consider giving it a Star ⭐, Thank you for your support! - -✨ 作者的其他开源项目: -✨ Other Open Source Projects by the Author: - -DouK-Downloader(抖音、DouYin、TikTok):https://github.com/JoeanAmier/TikTokDownloader -KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Downloader - -项目 Discord 社区:https://discord.com/invite/ZYtmgKud9Y -`; showTextModal({ - title: '关于 XHS-Downloader', text: aboutText, mode: 'info', closeText: '关闭' - }); + title: t.aboutTitle, text: t.aboutText, mode: 'info', closeText: t.closeButton + }).then(); } const abnormal = (text) => { showTextModal({ - title: '发生异常', - text: `${text}请向作者反馈!\n项目开源地址:https://github.com/JoeanAmier/XHS-Downloader`, - mode: 'info', - closeText: '关闭' - }); + title: t.errorTitle, text: t.errorText(text), mode: 'info', closeText: t.closeButton + }).then(); }; const runTips = (text) => { showTextModal({ - title: '脚本提示', text: text, mode: 'info', closeText: '关闭' - }); + title: t.tipsTitle, text: text, mode: 'info', closeText: t.closeButton + }).then(); } const generateVideoUrl = note => { @@ -296,7 +514,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download let items = extractImageWebpUrls(note, urls); if (items.length === 0) { console.error("解析图文作品数据失败", note) - abnormal("解析图文作品数据发生异常!") + abnormal(t.imageExtractError) } else if (urls.length > 1 && config.imageCheckboxSwitch) { data.index = await showImageSelectionModal(items, name, server,); } @@ -305,17 +523,17 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download } else { console.debug(`文件名称 ${name}`); if (note.type === "video") { - showToast("正在下载文件,请稍等..."); + showToast(t.downloadTips); await downloadVideo(urls[0], name); } else { let items = extractImageWebpUrls(note, urls); if (items.length === 0) { console.error("解析图文作品数据失败", note) - abnormal("解析图文作品数据发生异常!") + abnormal(t.imageExtractError) } else if (urls.length > 1 && config.imageCheckboxSwitch) { await showImageSelectionModal(items, name,); } else { - showToast("正在下载文件,请稍等..."); + showToast(t.downloadTips); await downloadImage(items, name); } } @@ -334,11 +552,11 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download // console.debug("下载链接", links); await download(links, note, server,); } else { - abnormal("处理下载链接发生异常!") + abnormal(t.downloadLinkError) } } catch (error) { console.error("Error in exploreDeal function:", error); - abnormal("下载作品文件发生异常!"); + abnormal(t.downloadError); } }; @@ -361,7 +579,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download if (note) { await exploreDeal(note, server,); } else { - abnormal("读取作品数据发生异常!"); + abnormal(t.extractError); } } }; @@ -481,7 +699,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download const downloadVideo = async (url, name) => { if (!await downloadFile(url, `${name}.mp4`)) { - abnormal("下载视频作品文件发生异常!"); + abnormal(t.videoDownloadError); } }; @@ -490,19 +708,19 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download if (!config.packageDownloadFiles && items.length > 1) { let result = []; for (let item of items) { - result.push( - await downloadFile(item.url, `${name}_${item.index}.${GM_getValue("imageDownloadFormat", "jpeg") - }`)); + result.push(await downloadFile( + item.url, + `${name}_${item.index}.${GM_getValue("imageDownloadFormat", "jpeg")}` + )); } success = result.every(item => item === true); } else if (items.length === 1) { - success = await downloadFile( - items[0].url, `${name}.${GM_getValue("imageDownloadFormat", "jpeg")}`); + success = await downloadFile(items[0].url, `${name}.${GM_getValue("imageDownloadFormat", "jpeg")}`); } else { success = await downloadFiles(items, name,); } if (!success) { - abnormal("下载图文作品文件发生异常!"); + abnormal(t.imageDownloadError); } }; @@ -634,7 +852,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download if (order >= 0 && order <= 2) { data = extractNotesInfo(order); if (!invalidDetection(data)) { - runTips("提取作品链接失败!受平台限制,未登录状态下无法通过账号主页浏览作品详情!请登录后重试!"); + runTips(t.signInPrompt); return; } } else if (order === 3) { @@ -676,17 +894,16 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download extractAllLinks(urlsString => { if (urlsString) { GM_setClipboard(urlsString, "text", () => { - showToast('作品/用户链接已复制到剪贴板!'); + showToast(t.linkExtractSuccess); }); } else { - showToast("未提取到任何作品/用户链接!") + showToast(t.linkExtractError) } }, order); }; if (typeof JSZip === 'undefined') { - runTips( - "XHS-Downloader 用户脚本依赖库 JSZip 加载失败,作品文件打包下载功能无法使用,请尝试刷新网页或者向作者反馈!"); + runTips(t.jsZipError); } let style = document.createElement('style'); @@ -928,7 +1145,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download */ function showTextModal(opts) { const { - title = '提示', text = '', mode = 'info', confirmText = '确认', closeText = '关闭', + title = t.tipsTitle, text = '', mode = 'info', confirmText = t.confirmButton, closeText = t.closeButton, } = opts || {}; if (document.getElementById('textGenericOverlay')) { @@ -1122,7 +1339,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download const header = document.createElement('div'); header.className = 'modal-header'; header.innerHTML = ` - 用户脚本设置 + ${t.settingsTitle} `; // 创建内容区域 @@ -1131,22 +1348,22 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download // 自动滚动开关 const autoScroll = createSwitchItem({ - label: '自动滚动页面', - description: '启用后,页面将根据规则自动滚动以便加载更多内容', + label: t.autoScrollLabel, + description: t.autoScrollDesc, checked: GM_getValue("autoScrollSwitch", false), }); // 文件打包开关 const filePack = createSwitchItem({ - label: '文件打包下载', - description: '启用后,多个文件的作品将会以压缩包格式下载', + label: t.filePackLabel, + description: t.filePackDesc, checked: GM_getValue("packageDownloadFiles", true), }); // 滚动次数设置 const scrollCount = createNumberInput({ - label: '自动滚动次数', - description: '自动滚动页面的次数(仅在启用自动滚动页面时可用)', + label: t.scrollCountLabel, + description: t.scrollCountDesc, value: GM_getValue("maxScrollCount", 50), min: 10, max: 9999, @@ -1154,40 +1371,40 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download }); const linkCheckboxSwitch = createSwitchItem({ - label: '链接提取选择模式', - description: '关闭后,提取作品链接时无需确认直接提取全部链接', + label: t.linkCheckboxSwitchLabel, + description: t.linkCheckboxSwitchDesc, checked: GM_getValue("linkCheckboxSwitch", true), }); const imageCheckboxSwitch = createSwitchItem({ - label: '图片下载选择模式', - description: '关闭后,下载图文作品时无需确认直接下载全部文件', + label: t.imageCheckboxSwitchLabel, + description: t.imageCheckboxSwitchDesc, checked: GM_getValue("imageCheckboxSwitch", true), }); const keepMenuVisible = createSwitchItem({ - label: '菜单保持显示', - description: '启用后,功能菜单无需鼠标悬停始终保持显示', + label: t.keepMenuVisibleLabel, + description: t.keepMenuVisibleDesc, checked: GM_getValue("keepMenuVisible", false), }); const scriptServerURL = createTextInput({ - label: 'WebSocket 服务器地址', - description: '用户脚本连接的 WebSocket 服务器', + label: t.scriptServerURLLabel, + description: t.scriptServerURLDesc, placeholder: defaultsWebSocketURL, value: GM_getValue("scriptServerURL", defaultsWebSocketURL), disabled: !GM_getValue("scriptServerSwitch", false), }); const scriptServerSwitch = createSwitchItem({ - label: '连接服务器', - description: '启用后,可以把下载任务推送至服务器', + label: t.scriptServerSwitchLabel, + description: t.scriptServerSwitchDesc, checked: GM_getValue("scriptServerSwitch", false), }); const imageDownloadFormat = createSelectItem({ - label: '图片下载格式', - description: '图文作品文件下载格式', + label: t.imageDownloadFormatLabel, + description: t.imageDownloadFormatDesc, options: ["PNG", "WEBP", "JPEG", "HEIC"], value: GM_getValue("imageDownloadFormat", "jpeg") .toUpperCase(), @@ -1226,10 +1443,10 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download footer.className = 'modal-footer'; const saveBtn = document.createElement('button'); saveBtn.className = 'primary-btn'; - saveBtn.textContent = '保存设置'; + saveBtn.textContent = t.saveSettingsButton; const cancelBtn = document.createElement('button'); cancelBtn.className = 'secondary-btn'; - cancelBtn.textContent = '放弃修改'; + cancelBtn.textContent = t.cancelSettingsButton; footer.appendChild(saveBtn); footer.appendChild(cancelBtn); @@ -1368,7 +1585,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download const header = document.createElement('div'); header.className = 'modal-header'; header.innerHTML = ` - 请选中需要下载的图片 + ${t.imageCheckboxTitle} `; // 创建内容区域 @@ -1422,19 +1639,19 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download // 新增:全选 / 全不选 const selectAllBtn = document.createElement('button'); selectAllBtn.className = 'secondary-btn'; - selectAllBtn.textContent = '全选'; + selectAllBtn.textContent = t.selectAllButton; const selectNoneBtn = document.createElement('button'); selectNoneBtn.className = 'secondary-btn'; - selectNoneBtn.textContent = '全不选'; + selectNoneBtn.textContent = t.deselectAllButton; const confirmBtn = document.createElement('button'); confirmBtn.className = 'primary-btn'; - confirmBtn.textContent = '开始下载'; + confirmBtn.textContent = t.startDownloadButton; const closeBtn = document.createElement('button'); closeBtn.className = 'secondary-btn'; - closeBtn.textContent = '关闭窗口'; + closeBtn.textContent = t.closeDownloadButton; footer.appendChild(selectAllBtn); footer.appendChild(selectNoneBtn); @@ -1458,14 +1675,14 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download } }); if (selectedImages.length === 0) { - showToast('请至少选择一张图片!'); + showToast(t.imageSelectionTip); return; } closeImagesModal(); if (server) { resolve(selectedImages.map(item => item.index)); } else { - showToast("正在下载文件,请稍等..."); + showToast(t.downloadTips); await downloadImage(selectedImages, name) } }); @@ -1598,7 +1815,10 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download */ function showListSelectionModal(list, options = {}) { const { - title = '请选择需要提取的项目', confirmText = '提取链接', cancelText = '放弃', prechecked = true, + title = t.itemsExtractTip, + confirmText = t.itemsExtractConfirm, + cancelText = t.itemsExtractCancel, + prechecked = true, } = options; if (document.getElementById('listSelectionOverlay')) return Promise.resolve(null); @@ -1692,11 +1912,11 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download // 新增:全选 / 全不选 const selectAllBtn = document.createElement('button'); selectAllBtn.className = 'secondary-btn'; - selectAllBtn.textContent = '全选'; + selectAllBtn.textContent = t.selectAllButton; const selectNoneBtn = document.createElement('button'); selectNoneBtn.className = 'secondary-btn'; - selectNoneBtn.textContent = '全不选'; + selectNoneBtn.textContent = t.deselectAllButton; // 右侧操作:确认 / 取消 const confirmBtn = document.createElement('button'); @@ -1860,7 +2080,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download flex: 1; } - .menutitle { + .menuTitle { font-size: 0.95rem; color: var(--on-surface); font-weight: 500; @@ -2038,67 +2258,67 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download if (!config.disclaimer) { menuItems.push({ - text: 'README', icon: ' 📄 ', action: readme, description: '阅读脚本说明和免责声明' + text: 'README', icon: ' 📄 ', action: readme, description: t.readmeMenuTitle },); } else if (currentUrl === "https://www.xiaohongshu.com/explore" || currentUrl.includes( "https://www.xiaohongshu.com/explore?")) { menuItems.push({ - text: '提取推荐作品链接', + text: t.extractRecommendLinksText, icon: ' ⛓ ', action: () => extractAllLinksEvent(-1), - description: '提取当前页面的作品链接至剪贴板' + description: t.extractRecommendLinksDescription },); } else if (currentUrl.includes("https://www.xiaohongshu.com/explore/") || currentUrl.includes( "https://www.xiaohongshu.com/discovery/item/")) { menuItems.push({ - text: '下载作品文件', + text: t.downloadNoteFilesText, icon: ' 📦 ', action: () => extractDownloadLinks(false), - description: '下载当前作品的无水印文件' + description: t.downloadNoteFilesDescription },); if (config.scriptServerSwitch) { menuItems.push({ - text: '推送下载任务', + text: t.pushDownloadTaskText, icon: ' 🌏 ', action: () => extractDownloadLinks(true), - description: '向服务器发送下载请求' + description: t.pushDownloadTaskDescription }); } } else if (currentUrl.includes("https://www.xiaohongshu.com/user/profile/")) { menuItems.push({ - text: '提取发布作品链接', + text: t.extractPublishedLinksText, icon: ' ⛓ ', action: () => extractAllLinksEvent(0), - description: '提取账号发布作品链接至剪贴板' + description: t.extractPublishedLinksDescription }, { - text: '提取点赞作品链接', + text: t.extractLikedLinksText, icon: ' ⛓ ', action: () => extractAllLinksEvent(2), - description: '提取账号点赞作品链接至剪贴板' + description: t.extractLikedLinksDescription }, { - text: '提取收藏作品链接', + text: t.extractSavedLinksText, icon: ' ⛓ ', action: () => extractAllLinksEvent(1), - description: '提取账号收藏作品链接至剪贴板' + description: t.extractSavedLinksDescription },); } else if (currentUrl.includes("https://www.xiaohongshu.com/search_result")) { menuItems.push({ - text: '提取作品链接', + text: t.extractSearchNoteLinksText, icon: ' ⛓ ', action: () => extractAllLinksEvent(3), - description: '提取搜索结果的作品链接至剪贴板' + description: t.extractSearchNoteLinksDescription }, { - text: '提取用户链接', + text: t.extractSearchUsersLinksText, icon: ' ⛓ ', action: () => extractAllLinksEvent(4), - description: '提取搜索结果的用户链接至剪贴板' + description: t.extractSearchUsersLinksDescription },); } else if (currentUrl.includes("https://www.xiaohongshu.com/board/")) { menuItems.push({ - text: "提取专辑作品链接", + text: t.extractAlbumNotesLinksText, icon: ' ⛓ ', action: () => extractAllLinksEvent(5), - description: '提取当前专辑的作品链接至剪贴板' + description: t.extractAlbumNotesLinksDescription },); } @@ -2106,12 +2326,12 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download menuItems.push({ separator: true }, { - text: '修改用户脚本设置', icon: ' ⚙️ ', action: showSettings, description: '修改用户脚本设置' + text: t.modifyScriptSettingsText, + icon: ' ⚙️ ', + action: showSettings, + description: t.modifyScriptSettingsDescription }, { - text: '关于 XHS-Downloader', - icon: ' 📒 ', - action: about, - description: '查看 XHS-Downloader 更多信息' + text: t.aboutXHSText, icon: ' 📒 ', action: about, description: t.aboutXHSDescription }); // 创建菜单项 @@ -2133,7 +2353,7 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download