Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #178 from huankong233/dev
Browse files Browse the repository at this point in the history
[+] 检查链接是否有效
  • Loading branch information
huankong233 authored Jul 27, 2024
2 parents 6305173 + 6cf63b8 commit 30443b7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MAIL_FROM_NAME=Example
MAIL_TO_ADDRESS=hello@example.com
MAIL_TO_NAME=Example

_94LIST_VERSION=1.3.24
_94LIST_VERSION=1.3.25
_94LIST_SLEEP=3
_94LIST_MAX_ONCE=20
_94LIST_PASSWORD=""
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 2024

### 07-27 v1.3.25

- [+] 检查链接是否有效
- [*] 优化盘外接口

### 07-25 v1.3.24

- [*] 修复错误的将风控提示转换为代理地址
Expand Down
6 changes: 6 additions & 0 deletions app/Http/Controllers/ParseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ public function getDownloadLinks(Request $request)
"fs_ids.*" => "required|numeric",
"url" => "required|string",
"surl" => "required|string",
"dir" => "required|string",
"pwd" => "string"
]);

Expand Down Expand Up @@ -553,6 +554,11 @@ public function getDownloadLinks(Request $request)
// 检查文件大小是否符合用户组配额
if (collect($fileList)->sum("size") > $checkLimitData["data"]["size"]) return ResponseController::groupQuotaSizeIsNotEnough();

// 检查链接是否有效
$valid = self::getFileList($request);
$validData = $valid->getData(true);
if ($validData["code"] !== 200) return $valid;

$parse_mode = config("94list.parse_mode");

$ua = config("94list.user_agent");
Expand Down
2 changes: 1 addition & 1 deletion config/94list.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fake_wx_user_agent" => "Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN miniProgram",
"fake_cookie" => "BAIDUID=A4FDFAE43DDBF7E6956B02F6EF715373:FG=1; BAIDUID_BFESS=A4FDFAE43DDBF7E6956B02F6EF715373:FG=1; newlogin=1",

"version" => "1.3.24",
"version" => "1.3.25",
"sleep" => (int)env("_94LIST_SLEEP", 3),
"max_once" => (int)env("_94LIST_MAX_ONCE", 20),
"password" => env("_94LIST_PASSWORD", ""),
Expand Down

0 comments on commit 30443b7

Please sign in to comment.