Skip to content

Commit 3d06d63

Browse files
author
Taois
committed
fix: post数据的错误处理
1 parent 6bb50cd commit 3d06d63

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

json/ftp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "本地ftp",
44
"id": "local",
5-
"host": "192.168.31.10",
5+
"host": "192.168.31.183",
66
"port": 2121,
77
"username": "your-username",
88
"password": "your-password",

libs_drpy/drpyInject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ async function request(url, opt = {}) {
178178
}
179179

180180
// 根据有效的 postType 处理数据
181-
if (effectivePostType === 'form' && data != null) {
181+
if (effectivePostType === 'form' && data != null && typeof data === 'object') {
182182
data = qs.stringify(data, {encode: false});
183-
} else if (effectivePostType === 'form-data' && data != null) {
183+
} else if (effectivePostType === 'form-data' && data != null && typeof data === 'object') {
184184
data = toFormData(data);
185185
}
186186
if (data) {

spider/js/星芽短剧.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ var rule = {
8282
},
8383
body: "device=24250683a3bdb3f118dff25ba4b1cba1a&install_first_open=false&first_install_time=1723214205125&last_update_time=1723214205125&report_link_url="
8484
});
85+
// log('html:', html);
8586
html = JSON.parse(html);
8687
try {
8788
rule.headers['authorization'] = html.data.token

0 commit comments

Comments
 (0)