mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
feat(script): 添加未登录状态下无法提取作品链接的提示
This commit is contained in:
parent
f39f5a8552
commit
9ad005c381
@ -18,9 +18,10 @@
|
|||||||
|
|
||||||
**用户脚本更新内容:**
|
**用户脚本更新内容:**
|
||||||
|
|
||||||
**版本号:2.1.1**
|
**版本号:2.1.2**
|
||||||
|
|
||||||
1. 修复单张图片的作品下载后文件损坏问题
|
1. 修复单张图片的作品下载后文件损坏问题
|
||||||
2. 脚本设置新增 `菜单始终显示` 配置项
|
2. 添加未登录状态下无法提取作品链接的提示
|
||||||
3. 修复用户脚本 CSS 样式冲突问题
|
3. 脚本设置新增 `菜单始终显示` 配置项
|
||||||
4. 优化提取作品 ID 的正则表达式
|
4. 修复用户脚本 CSS 样式冲突问题
|
||||||
|
5. 优化提取作品 ID 的正则表达式
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name XHS-Downloader
|
// @name XHS-Downloader
|
||||||
// @namespace https://github.com/JoeanAmier/XHS-Downloader
|
// @namespace https://github.com/JoeanAmier/XHS-Downloader
|
||||||
// @version 2.1.1
|
// @version 2.1.2
|
||||||
// @description 提取小红书作品/用户链接,下载小红书无水印图文/视频作品文件
|
// @description 提取小红书作品/用户链接,下载小红书无水印图文/视频作品文件
|
||||||
// @author JoeanAmier
|
// @author JoeanAmier
|
||||||
// @match http*://xhslink.com/*
|
// @match http*://xhslink.com/*
|
||||||
@ -510,11 +510,17 @@ XHS-Downloader 用户脚本 详细说明:
|
|||||||
|
|
||||||
const generateUserUrls = data => data.map(id => `https://www.xiaohongshu.com/user/profile/${id}`).join(" ");
|
const generateUserUrls = data => data.map(id => `https://www.xiaohongshu.com/user/profile/${id}`).join(" ");
|
||||||
|
|
||||||
|
const invalidDetection = data => data.every(([first]) => Boolean(first));
|
||||||
|
|
||||||
const extractAllLinks = (callback, order) => {
|
const extractAllLinks = (callback, order) => {
|
||||||
scrollScreenEvent(() => {
|
scrollScreenEvent(() => {
|
||||||
let data;
|
let data;
|
||||||
if (order >= 0 && order <= 2) {
|
if (order >= 0 && order <= 2) {
|
||||||
data = extractNotesInfo(order);
|
data = extractNotesInfo(order);
|
||||||
|
if (!invalidDetection(data)) {
|
||||||
|
alert("提取作品链接失败!受平台限制,未登录状态下无法通过账号主页浏览作品!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else if (order === 3) {
|
} else if (order === 3) {
|
||||||
data = extractSearchNotes();
|
data = extractSearchNotes();
|
||||||
} else if (order === 4) {
|
} else if (order === 4) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user