Skip to content

Commit 42aa4f7

Browse files
author
Taois
committed
feat: 修复bug
1 parent ed2b08f commit 42aa4f7

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ yarn build
1717
# 调试教程
1818

1919
* windows平台自定义字体支持(flutter windows平台字体渲染效果不好 换个字体有所改善),ttf文件放入data\flutter_assets\fonts\ttf目录即可
20-
* 新增运行时调试支持,基于Node.js Debugging,方便爬虫编写打包后在App内运行时定位问题,支持sourceMap加载。 sourceMap输出请参考 esbuild 打包脚本。
21-
* 调试工作流程 app内开启调试模式 -> 重启app -> 使用chrome等调试器关联进程(参考上面的nodejs官方文档) -> 发现问题 修改源码 打包js -> 应用内重载 -> 继续调试
20+
* 新增运行时调试支持,基于Node.js Debugging,方便爬虫编写打包后在App内运行时定位问题,支持sourceMap加载。 sourceMap输出请参考
21+
esbuild 打包脚本。
22+
* 调试工作流程 app内开启调试模式 -> 重启app -> 使用chrome等调试器关联进程(参考上面的nodejs官方文档) -> 发现问题 修改源码
23+
打包js -> 应用内重载 -> 继续调试
24+
* 复制文件到ds的 `data/cat` 目录。注意全局替换代码文本里含有的真实链接为 `$config_url` ,主页源链接为 `$host`
2225

2326
# 参考资料
2427

@@ -43,13 +46,18 @@ yarn build
4346

4447
# 更新记录
4548

49+
### 20250821
50+
51+
1. 支持 t4源ext扩展放object,适配ds的hipy源
52+
2. 增加 $host变量
53+
4654
### 20250224
4755

4856
1.alist更新如下:
4957
增加账号密码登录
5058
sort赋值为true时强制按名称排序
5159
去除login部分,login赋值{} ,
52-
login.username赋值""或"guest"(不区分大小写)都可表示游客登录
60+
login.username赋值""或"guest"(不区分大小写)都可表示游客登录
5361

5462
### 20250123
5563

nodejs/source/ds-cat.20250821.7z

316 KB
Binary file not shown.

nodejs/src/index.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
22
drpyS: {
3-
config_url: 'http://localhost:5757/config/1?sub=all&pwd=', // 本地ds 支持
3+
config_url: 'http://localhost:5757/config/1?sub=all&pwd=dzyyds', // 本地ds 支持
44
// config_url: 'http://localhost:5707/config/0?sub=dzyyds', // 本地hipy-t4 支持
55
home_site: 'http://localhost:5757/api/设置中心',
66
enable_dspush: 1,

nodejs/src/router.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ export default async function router(fastify) {
7878
meta.key = skey === 'push_agent' ? 'push' : skey;
7979
meta.name = site.name;
8080
meta.api = spiderPrefix + '/' + 'drpyS' + '/' + meta.type + '/' + meta.key;
81-
meta.ext = {api: site.api, extend: site.ext};
81+
// const extend = (Array.isArray(site.ext) || typeof site.ext == 'object') ? JSON.stringify(site.ext) : site.ext;
82+
const extend = site.ext;
83+
meta.ext = {api: site.api, extend: extend};
8284
return meta;
8385
});
8486

8587
dsParses = drpyS_data.parses;
86-
88+
// console.log(dsSites);
8789

8890
dsSites.forEach((site) => {
8991
const path = site.api;

nodejs/src/spider/video/drpyS.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function getSiteUrl(skeyHash) {
2323
const site = sitesCache.get(skeyHash);
2424
let url = site.api;
2525
if (site.extend) {
26-
url = mergeQuery(url, {extend: site.extend});
26+
const extStr = (Array.isArray(site.extend) || typeof site.extend == 'object') ? JSON.stringify(site.extend) : site.extend;
27+
url = mergeQuery(url, {extend: extStr});
2728
}
2829
return url
2930
}

0 commit comments

Comments
 (0)