mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-11-27 15:47:00 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ce0a1c3a7 |
No files matched your search
@@ -19,10 +19,10 @@ QQ交流群:1017480890
|
|||||||
|
|
||||||
|
|
||||||
> 本平台所有音乐解析工具不再维护,请移步[Sonder播放器](https://sodecode.qaiu.top)
|
> 本平台所有音乐解析工具不再维护,请移步[Sonder播放器](https://sodecode.qaiu.top)
|
||||||
> 需要百度,迅雷,UC,夸克的完整支持请使用[专业版](https://189.qaiu.top)
|
> 需要百度、迅雷的完整支持请使用[专业版](https://189.qaiu.top)。夸克网盘、UC网盘已包含在开源版。
|
||||||
|
|
||||||
## 介绍
|
## 介绍
|
||||||
> netdisk-fast-download网盘直链解析可以把云盘分享链接转为直链,可广泛应用于各类下载站,资源站,个人博客,图床,APP下载更新,视频点播等领域。支持市面各大主流云盘的文件分享以及文件夹分享链接,已支持蓝奏云/蓝奏云优享/移动云云空间/小飞机盘/亿方云/123云盘/永硕E盘/Cloudreve等,支持加密分享,以及部分网盘文件夹分享。
|
> netdisk-fast-download网盘直链解析可以把云盘分享链接转为直链,可广泛应用于各类下载站,资源站,个人博客,图床,APP下载更新,视频点播等领域。支持市面各大主流云盘的文件分享以及文件夹分享链接,已支持蓝奏云/蓝奏云优享/移动云云空间/小飞机盘/亿方云/123云盘/夸克网盘/UC网盘/永硕E盘/Cloudreve等,支持加密分享,以及部分网盘文件夹分享。
|
||||||
|
|
||||||
[官方文档](https://nfd-parser.github.io/)
|
[官方文档](https://nfd-parser.github.io/)
|
||||||
[API接入](https://nfdparser.apifox.cn/)
|
[API接入](https://nfdparser.apifox.cn/)
|
||||||
@@ -80,6 +80,8 @@ wget -O v01 "https://lz.qaiu.top/parser?url=https%3A%2F%2Fwww.ecpan.cn%2Fweb%2F%
|
|||||||
- [123云盘-ye](https://www.123pan.com/) ⚠️仅建议本地部署使用。公共云解析没有共享 123 账号;下载返回 5112 / 请登录后下载时,在本机配置 `auths.ye.authorization`(Windows 可直接用 run.bat)
|
- [123云盘-ye](https://www.123pan.com/) ⚠️仅建议本地部署使用。公共云解析没有共享 123 账号;下载返回 5112 / 请登录后下载时,在本机配置 `auths.ye.authorization`(Windows 可直接用 run.bat)
|
||||||
- ~[115网盘(失效)-p115](https://115.com/)~
|
- ~[115网盘(失效)-p115](https://115.com/)~
|
||||||
- [文叔叔-ws](https://www.wenshushu.cn/)
|
- [文叔叔-ws](https://www.wenshushu.cn/)
|
||||||
|
- [夸克网盘-qk](https://pan.quark.cn/)
|
||||||
|
- [UC网盘-uc](https://fast.uc.cn/)
|
||||||
- [联想乐云-le](https://lecloud.lenovo.com/)
|
- [联想乐云-le](https://lecloud.lenovo.com/)
|
||||||
- [QQ邮箱云盘-qqw](https://mail.qq.com/)
|
- [QQ邮箱云盘-qqw](https://mail.qq.com/)
|
||||||
- [QQ闪传-qqsc](https://nutty.qq.com/nutty/ssr/26797.html)
|
- [QQ闪传-qqsc](https://nutty.qq.com/nutty/ssr/26797.html)
|
||||||
@@ -104,8 +106,6 @@ wget -O v01 "https://lz.qaiu.top/parser?url=https%3A%2F%2Fwww.ecpan.cn%2Fweb%2F%
|
|||||||
- 百度网盘开放平台-bd
|
- 百度网盘开放平台-bd
|
||||||
- 迅雷云盘开放平台-xl
|
- 迅雷云盘开放平台-xl
|
||||||
- [光鸭云盘开放平台-gy](https://www.guangyapan.com)
|
- [光鸭云盘开放平台-gy](https://www.guangyapan.com)
|
||||||
- [夸克云盘-qk](https://pan.quark.cn/)
|
|
||||||
- [UC云盘-uc](https://fast.uc.cn/)
|
|
||||||
- [移动云盘-p139](https://yun.139.com/)
|
- [移动云盘-p139](https://yun.139.com/)
|
||||||
- [联通云盘-pwo](https://pan.wo.cn/)
|
- [联通云盘-pwo](https://pan.wo.cn/)
|
||||||
- [天翼云盘-p189](https://cloud.189.cn/)
|
- [天翼云盘-p189](https://cloud.189.cn/)
|
||||||
@@ -470,7 +470,7 @@ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtow
|
|||||||
> 注意: netdisk-fast-download.service中的ExecStart的路径改为实际路径
|
> 注意: netdisk-fast-download.service中的ExecStart的路径改为实际路径
|
||||||
```shell
|
```shell
|
||||||
cd ~
|
cd ~
|
||||||
wget -O netdisk-fast-download.zip https://github.com/qaiu/netdisk-fast-download/releases/download/v0.4.9/netdisk-fast-download-linux-amd64.zip
|
wget -O netdisk-fast-download.zip https://github.com/qaiu/netdisk-fast-download/releases/download/v0.4.10/netdisk-fast-download-linux-amd64.zip
|
||||||
unzip netdisk-fast-download.zip
|
unzip netdisk-fast-download.zip
|
||||||
cd netdisk-fast-download
|
cd netdisk-fast-download
|
||||||
bash service-install.sh
|
bash service-install.sh
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>0.4.9</revision>
|
<revision>0.4.10</revision>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nfd-web",
|
"name": "nfd-web",
|
||||||
"version": "0.4.9",
|
"version": "0.4.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
const PAN_NAMES = {
|
||||||
|
qk: '夸克网盘',
|
||||||
|
uc: 'UC网盘',
|
||||||
|
lz: '蓝奏云',
|
||||||
|
iz: '蓝奏云优享',
|
||||||
|
fj: '小飞机盘',
|
||||||
|
ye: '123云盘',
|
||||||
|
ec: '移动云空间',
|
||||||
|
le: '联想乐云',
|
||||||
|
qqsc: 'QQ闪传',
|
||||||
|
pic: 'iCloud'
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 与专业版摘要一致:169.1 M,而不是 169.1MB。 */
|
||||||
|
function formatByteSize(bytes) {
|
||||||
|
const value = Number(bytes)
|
||||||
|
if (!Number.isFinite(value) || value < 0) return ''
|
||||||
|
const units = ['B', 'K', 'M', 'G', 'T']
|
||||||
|
let size = value
|
||||||
|
let index = 0
|
||||||
|
while (size >= 1024 && index < units.length - 1) {
|
||||||
|
size /= 1024
|
||||||
|
index += 1
|
||||||
|
}
|
||||||
|
const text = index === 0 ? String(Math.round(size)) : size.toFixed(1)
|
||||||
|
return `${text} ${units[index]}`
|
||||||
|
}
|
||||||
|
|
||||||
|
function panDisplayName(panType, panList) {
|
||||||
|
const type = String(panType || '').toLowerCase()
|
||||||
|
if (!type) return ''
|
||||||
|
const found = (panList || []).find(item => String(item.type || '').toLowerCase() === type)
|
||||||
|
if (found && found.name) return found.name
|
||||||
|
return PAN_NAMES[type] || type
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 单文件解析成功摘要:文件名、大小、网盘类型。 */
|
||||||
|
function buildParseFileMeta({ fileName, size, sizeStr, panType, panList } = {}) {
|
||||||
|
const meta = []
|
||||||
|
if (fileName) meta.push(String(fileName))
|
||||||
|
const sizeText = sizeStr || formatByteSize(size)
|
||||||
|
if (sizeText) meta.push(sizeText)
|
||||||
|
const pan = panDisplayName(panType, panList)
|
||||||
|
if (pan) meta.push(pan)
|
||||||
|
return meta
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
formatByteSize,
|
||||||
|
panDisplayName,
|
||||||
|
buildParseFileMeta
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
const { test } = require('node:test')
|
||||||
|
const assert = require('node:assert/strict')
|
||||||
|
const { buildParseFileMeta, formatByteSize, panDisplayName } = require('./parseResultMeta.js')
|
||||||
|
|
||||||
|
test('formats binary size like 169.1 M', () => {
|
||||||
|
assert.equal(formatByteSize(0), '0 B')
|
||||||
|
assert.equal(formatByteSize(169.1 * 1024 * 1024), '169.1 M')
|
||||||
|
assert.equal(formatByteSize(10 * 1024 * 1024), '10.0 M')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('builds filename, size and pan tag', () => {
|
||||||
|
assert.deepEqual(buildParseFileMeta({
|
||||||
|
fileName: '末世冰潮.apk',
|
||||||
|
sizeStr: '169.1 M',
|
||||||
|
panType: 'lz',
|
||||||
|
panList: [{ type: 'lz', name: '蓝奏云' }]
|
||||||
|
}), ['末世冰潮.apk', '169.1 M', '蓝奏云'])
|
||||||
|
})
|
||||||
|
|
||||||
|
test('falls back to quark and uc names', () => {
|
||||||
|
assert.equal(panDisplayName('qk', []), '夸克网盘')
|
||||||
|
assert.equal(panDisplayName('UC', []), 'UC网盘')
|
||||||
|
assert.deepEqual(buildParseFileMeta({
|
||||||
|
fileName: 'bilitools_1.4.7_amd64.AppImage',
|
||||||
|
size: 92899832,
|
||||||
|
panType: 'qk'
|
||||||
|
})[2], '夸克网盘')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('omits missing fields', () => {
|
||||||
|
assert.deepEqual(buildParseFileMeta({}), [])
|
||||||
|
assert.deepEqual(buildParseFileMeta({ fileName: 'a.txt' }), ['a.txt'])
|
||||||
|
})
|
||||||
@@ -75,8 +75,8 @@
|
|||||||
<div class="project-intro">
|
<div class="project-intro">
|
||||||
<div class="intro-title">NFD网盘直链解析 {{ projectVersion }}</div>
|
<div class="intro-title">NFD网盘直链解析 {{ projectVersion }}</div>
|
||||||
<div class="intro-desc">
|
<div class="intro-desc">
|
||||||
<div>支持网盘:蓝奏云、蓝奏云优享、小飞机盘、123云盘、iCloud、移动云空间、联想乐云、QQ闪传等 <el-link style="color:#606cf5" :href="githubRepoUrl + '?tab=readme-ov-file#%E7%BD%91%E7%9B%98%E6%94%AF%E6%8C%81%E6%83%85%E5%86%B5'" target="_blank"> >> </el-link></div>
|
<div>支持网盘:蓝奏云、蓝奏云优享、小飞机盘、123云盘、夸克网盘、UC网盘、iCloud、移动云空间、联想乐云、QQ闪传等 <el-link style="color:#606cf5" :href="githubRepoUrl + '?tab=readme-ov-file#%E7%BD%91%E7%9B%98%E6%94%AF%E6%8C%81%E6%83%85%E5%86%B5'" target="_blank"> >> </el-link></div>
|
||||||
<div>文件夹解析支持:蓝奏云、蓝奏云优享、小飞机盘、123云盘</div>
|
<div>文件夹解析支持:蓝奏云、蓝奏云优享、小飞机盘、123云盘、夸克网盘、UC网盘</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="typo">
|
<div class="typo">
|
||||||
@@ -122,7 +122,12 @@
|
|||||||
|
|
||||||
<!-- 解析结果 -->
|
<!-- 解析结果 -->
|
||||||
<div v-if="parseResult.code" style="margin-top: 10px">
|
<div v-if="parseResult.code" style="margin-top: 10px">
|
||||||
<strong>解析结果: </strong>
|
<strong :style="parseResult.code === 200 ? 'color:var(--el-color-success)' : 'color:var(--el-color-danger)'">
|
||||||
|
{{ parseResult.code === 200 ? '解析成功' : '解析失败' }}
|
||||||
|
</strong>
|
||||||
|
<span v-if="parseResult.code === 200 && parsedFileMeta.length" class="parse-file-meta">
|
||||||
|
<el-tag v-for="item in parsedFileMeta" :key="item" size="small" type="info" effect="plain">{{ item }}</el-tag>
|
||||||
|
</span>
|
||||||
<json-viewer :value="parseResult" :expand-depth="5" copyable boxed sort />
|
<json-viewer :value="parseResult" :expand-depth="5" copyable boxed sort />
|
||||||
<!-- 下载链接卡片 -->
|
<!-- 下载链接卡片 -->
|
||||||
<div v-if="downloadUrl" style="margin-top: 15px;">
|
<div v-if="downloadUrl" style="margin-top: 15px;">
|
||||||
@@ -416,6 +421,12 @@
|
|||||||
|
|
||||||
<!-- 目录树组件 -->
|
<!-- 目录树组件 -->
|
||||||
<div v-if="showDirectoryTree" class="directory-tree-container">
|
<div v-if="showDirectoryTree" class="directory-tree-container">
|
||||||
|
<div v-if="folderParseMeta.length" style="margin-bottom: 10px;">
|
||||||
|
<strong style="color:var(--el-color-success)">解析成功</strong>
|
||||||
|
<span class="parse-file-meta">
|
||||||
|
<el-tag v-for="item in folderParseMeta" :key="item" size="small" type="info" effect="plain">{{ item }}</el-tag>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div style="margin-bottom: 10px; text-align: right;">
|
<div style="margin-bottom: 10px; text-align: right;">
|
||||||
<ViewModeSwitch v-model="directoryViewMode" pane-label="窗格" tree-label="文件树" />
|
<ViewModeSwitch v-model="directoryViewMode" pane-label="窗格" tree-label="文件树" />
|
||||||
</div>
|
</div>
|
||||||
@@ -620,6 +631,7 @@ import ViewModeSwitch from '@/components/ViewModeSwitch'
|
|||||||
import DownloadDialog from '@/components/DownloadDialog'
|
import DownloadDialog from '@/components/DownloadDialog'
|
||||||
import parserUrl from '../parserUrl1'
|
import parserUrl from '../parserUrl1'
|
||||||
import { openNoReferrer } from '../utils/openNoReferrer'
|
import { openNoReferrer } from '../utils/openNoReferrer'
|
||||||
|
import parseResultMeta from '../utils/parseResultMeta'
|
||||||
import fileTypeUtils from '@/utils/fileTypeUtils'
|
import fileTypeUtils from '@/utils/fileTypeUtils'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { playgroundApi } from '@/utils/playgroundApi'
|
import { playgroundApi } from '@/utils/playgroundApi'
|
||||||
@@ -751,6 +763,27 @@ export default {
|
|||||||
projectVersion() {
|
projectVersion() {
|
||||||
return process.env.VUE_APP_VERSION || '0.0.0'
|
return process.env.VUE_APP_VERSION || '0.0.0'
|
||||||
},
|
},
|
||||||
|
parsedFileMeta() {
|
||||||
|
const data = this.parseResult?.data || {}
|
||||||
|
const info = data.fileInfo || data.otherParam?.fileInfo || {}
|
||||||
|
const panType = info.panType || data.panType || ''
|
||||||
|
return parseResultMeta.buildParseFileMeta({
|
||||||
|
fileName: info.fileName,
|
||||||
|
size: info.size,
|
||||||
|
sizeStr: info.sizeStr,
|
||||||
|
panType,
|
||||||
|
panList: this.panList
|
||||||
|
})
|
||||||
|
},
|
||||||
|
folderParseMeta() {
|
||||||
|
if (!this.showDirectoryTree) return []
|
||||||
|
const meta = [`${this.directoryData.length} 个文件/文件夹`]
|
||||||
|
const recognized = parserUrl.parseLink(this.link || '')
|
||||||
|
const panType = this.getCurrentPanType()
|
||||||
|
const name = recognized?.name || (panType ? parseResultMeta.panDisplayName(panType.toLowerCase(), this.panList) : '')
|
||||||
|
if (name) meta.push(name)
|
||||||
|
return meta
|
||||||
|
},
|
||||||
// 检查是否配置了认证信息(针对当前链接的网盘类型)
|
// 检查是否配置了认证信息(针对当前链接的网盘类型)
|
||||||
hasAuthConfig() {
|
hasAuthConfig() {
|
||||||
const panType = this.getCurrentPanType()
|
const panType = this.getCurrentPanType()
|
||||||
@@ -2142,6 +2175,13 @@ hr {
|
|||||||
font-size: 0.98rem;
|
font-size: 0.98rem;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
}
|
}
|
||||||
|
.parse-file-meta {
|
||||||
|
margin-left: 10px;
|
||||||
|
display: inline-flex;
|
||||||
|
gap: 6px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
.dark-theme .project-intro, .dark-theme .intro-title, .dark-theme .intro-desc {
|
.dark-theme .project-intro, .dark-theme .intro-title, .dark-theme .intro-desc {
|
||||||
color: #bbb;
|
color: #bbb;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -598,6 +598,8 @@ GET /v2/redirectUrl/pan/eyJmaWxlSWQiOiIxMjM0NTYifQ==
|
|||||||
- 小飞机盘 (fj)
|
- 小飞机盘 (fj)
|
||||||
- 360亿方云 (fc)
|
- 360亿方云 (fc)
|
||||||
- 联想乐云 (le)
|
- 联想乐云 (le)
|
||||||
|
- 夸克网盘 (qk)
|
||||||
|
- UC网盘 (uc)
|
||||||
- 文叔叔 (ws)
|
- 文叔叔 (ws)
|
||||||
- Cloudreve (ce)
|
- Cloudreve (ce)
|
||||||
- 等等...
|
- 等等...
|
||||||
|
|||||||
Reference in new issue
Block a user