5 Commits
2.2.0 ... 2.3.0

Author SHA1 Message Date
putyy
d9259bb259 Merge pull request #114 from putyy/dev
win7支持
2024-12-04 16:17:08 +08:00
putyy
8756e5357a 修改Md 2024-12-04 16:15:20 +08:00
putyy
4c09b8f3be x 2024-12-04 15:47:38 +08:00
putyy
6f3e361ee6 x 2024-12-04 15:46:57 +08:00
putyy
93d9dbe32b win7支持,修复目录缓存失效 2024-12-02 17:36:51 +08:00
8 changed files with 27 additions and 70 deletions

View File

@@ -2,8 +2,8 @@
### 爱享素材下载器【[加入群聊](https://qm.qq.com/q/mfDMSpCxQ4)】
🎯 基于 [electron-vite-vue](https://github.com/electron-vite/electron-vite-vue.git)
📦 操作简单、可获取不同类型的资源
🖥️ 支持Win10、Win11、Mac、Linux
🌐 支持视频、音频、图片、m3u8、直播流等常见网络资源拦截
🖥️ 支持Windows、Mac、Linux
🌐 支持视频、音频、图片、m3u8、直播流等常见网络资源
💪 支持微信视频号、小程序、抖音、快手、小红书、酷狗音乐、qq音乐等网络资源下载
👼 支持设置代理以获取特殊网络下的资源
@@ -12,9 +12,9 @@
🆕 [蓝奏云下载 密码:9vs5](https://wwjv.lanzoum.com/b04wgtfyb)
## 使用方法
> 0. 安装一定要同意安装证书文件,安装一定要同意安装证书文件,安装一定要同意安装证书文件!
> 1. 打开本软件
> 2. 软件首页选择要获取的资源类型(默认选中的视频
> 0. 安装一定要同意安装证书文件、使用时一定要允许网络访问
> 1. 打开本软件 软件首页左上角点击 “启动代理”
> 2. 软件首页选择要获取的资源类型(默认选中的全部
> 3. 打开要捕获的源, 如:视频号、网页、小程序等等
> 4. 返回软件首页即可看到资源列表
@@ -22,19 +22,16 @@
![](public/show.webp)
## 常见问题
m3u8预览和下载
m3u8: 预览和下载:
> [下载](https://m3u8-down.gowas.cn/) [预览](https://m3u8play.com/)
直播流 预览和录制:
> [使用obs进行预览和录制]( https://obsproject.com/)
直播流: 预览和录制:
> [使用obs进行预览和录制 使用教程自行百度]( https://obsproject.com/)
下载慢、大视频下载失败(最新版本内置aria2下载器)
下载慢、大视频下载失败(最新版本内置aria2下载器)
> 推荐使用如下工具加速下载,视频号可以下载完成后再到对应视频操作项选择 “视频解密(视频号)” 按钮
>> [Neat Download Manager](https://www.neatdownloadmanager.com/index.php/en/)、[Motrix](https://motrix.app/download)等软件进行下载
Win7无法使用
> 软件不支持,也无计划支持
打开本软件,无法正常拦截获取
> 检查系统代理是否正确设置 代理地址127.0.0.1 端口8899
@@ -43,34 +40,14 @@ Win7无法使用
打开本软件后无法上网
> 手动删除安装标识锁文件,之后再打开软件会进行检查证书是否正确安装
>> MAC: /Users/你的用户名称/.res-downloader@putyy/res-downloader-installed.lock
>> MAC: /Users/你的用户名称/.res-downloader@putyy/res-downloader-installed.lock
>
>> Win: C:\Users\Admin\.res-downloader@putyy/res-downloader-installed.lock
其他问题
[github](https://github.com/putyy/res-downloader/issues) 、 [爱享论坛](https://s.gowas.cn/d/4089)
## 二次开发
> ps 打包慢的问题可以参考 https://www.putyy.com/articles/87
```sh
git clone https://github.com/putyy/res-downloader
cd res-downloader
yarn install
yarn run dev
# 打包mac
yarn run build --universal --mac
# 打包win
yarn run build --win
# 打包linux
yarn run build --linux
```
## 实现&初衷
## 实现 & 初衷
通过代理网络抓包拦截响应,筛选出有用的资源, 同fiddler、charles等抓包软件、浏览器F12打开控制也能达到目的只不过这些软件需要手动进行筛选对于小白用户上手还是有点难度本软件对部分资源做了特殊处理更适合大众用户所以就有了本项目。
## 免责声明

View File

@@ -36,16 +36,10 @@ export class Aria2RPC {
}
calculateDownloadProgress(bitfield) {
// 将十六进制的 bitfield 转换为二进制字符串
const totalPieces = bitfield.length * 4; // 每个十六进制字符对应 4 位
const binaryString = bitfield.split('').map(hex => parseInt(hex, 16).toString(2).padStart(4, '0')).join('');
// 计算已下载的部分数
const downloadedPieces = binaryString.split('').filter(bit => bit === '1').length;
// 计算进度百分比
const progressPercentage = (downloadedPieces / totalPieces) * 100;
return progressPercentage.toFixed(2); // 保留两位小数
const totalPieces = bitfield.length * 4
const binaryString = bitfield.split('').map(hex => parseInt(hex, 16).toString(2).padStart(4, '0')).join('')
const downloadedPieces = binaryString.split('').filter(bit => bit === '1').length
const progressPercentage = (downloadedPieces / totalPieces) * 100
return progressPercentage.toFixed(2)
}
}

View File

@@ -69,6 +69,8 @@ global.resdConfig = {
}
// app.whenReady().then(createWindow)
// 修复部分机型GPU主窗口空白错误
app.disableHardwareAcceleration();
app.on('window-all-closed', () => {
mainWindow = null

View File

@@ -58,19 +58,6 @@ export default function initIPC() {
});
return false
}
// let upstream_proxy = ""
// if (arg.upstream_proxy && !arg.upstream_proxy.includes(':8899')) {
// upstream_proxy = arg.upstream_proxy
// }
//
// global.isStartProxy = true
// return startServer({
// win: win,
// upstreamProxy: upstream_proxy,
// setProxyErrorCallback: err => {
// console.log('setProxyErrorCallback', err)
// },
// })
})
ipcMain.handle('invoke_select_down_dir', async (event, arg) => {
@@ -107,12 +94,10 @@ export default function initIPC() {
}
if (quality === "0" && data.decode_key) {
const urlInfo = urlTool.parse(down_url, true);
console.log('urlInfo', urlInfo)
if (urlInfo.query["token"] && urlInfo.query["encfilekey"]) {
down_url = urlInfo.protocol + "//" + urlInfo.hostname + urlInfo.pathname.replace("251/20302", "251/20304") +
"?encfilekey=" + urlInfo.query["encfilekey"] +
"&token=" + urlInfo.query["token"]
console.log("down_url:", down_url)
}
} else if (quality !== "-1" && data.decode_key && data.file_format) {
const format = data.file_format.split('#');
@@ -158,7 +143,7 @@ export default function initIPC() {
})
resolve(res)
}).catch((error) => {
console.log("err:", error)
console.log("decodeWxFile err:", error)
resolve(false);
})
} else {
@@ -168,13 +153,13 @@ export default function initIPC() {
}
}
}).catch((error) => {
console.error(error)
console.log("aria2RpcClient err:", error)
clearInterval(progressIntervalId)
resolve(false)
});
}, 1000)
}).catch((error) => {
console.log("err:", error)
console.log("aria2RpcClient.addUri err:", error)
resolve(false)
});
});

View File

@@ -38,7 +38,6 @@ export function startServer(win) {
if (global.resdConfig.proxy && !global.resdConfig.proxy.includes(':' + global.resdConfig.port)) {
upstreamProxy = global.resdConfig?.proxy
}
console.log("global.resdConfig.port:", global.resdConfig.port)
const proxy = hoXy.createServer({
upstreamProxy: upstreamProxy,
certAuthority: {
@@ -54,7 +53,7 @@ export function startServer(win) {
})
intercept(proxy, win)
} catch (e) {
console.error("--------------proxy catch err--------------");
console.error("--------------proxy catch err--------------", e);
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "res-downloader",
"version": "2.2.0",
"version": "2.3.0",
"main": "dist-electron/main/index.js",
"description": "res-downloader(爱享素材下载器)支持视频号、小程序、抖音、快手、小红书、酷狗音乐、qq音乐、qq短视频等",
"homepage": "https://github.com/putyy/res-downloader",
@@ -32,8 +32,8 @@
"@vitejs/plugin-vue": "^4.3.3",
"cross-spawn": "^7.0.3",
"crypto-js": "^4.1.1",
"electron": "^26.0.0",
"electron-builder": "^24.6.3",
"electron": "^22.3.27",
"electron-builder": "^23.6.0",
"electron-is-dev": "^2.0.0",
"electron-log": "^4.4.8",
"element-plus": "^2.3.12",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -48,7 +48,7 @@ const selectSaveDir = () => {
}
const onSetting = () => {
localStorageCache.set("resd_config", JSON.stringify(formData.value))
localStorageCache.set("resd_config", JSON.stringify(formData.value), -1)
ipcRenderer.invoke('invoke_set_config', Object.assign({}, formData.value))
if (proxy_old.value != formData.value.proxy || port_old.value != formData.value.port){
ipcRenderer.invoke('invoke_window_restart')