From d53b365fa7c5f368f213e7cb113ac659761c4873 Mon Sep 17 00:00:00 2001 From: filesite Date: Mon, 18 Sep 2023 09:36:00 +0800 Subject: [PATCH] url match improved --- themes/tajian/controller/ApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/tajian/controller/ApiController.php b/themes/tajian/controller/ApiController.php index 1fda37c..57aa2cd 100644 --- a/themes/tajian/controller/ApiController.php +++ b/themes/tajian/controller/ApiController.php @@ -110,7 +110,7 @@ Class ApiController extends SiteController { $done = true; $newVideo = array(); - preg_match("/https:\/\/[\w\.]+\/\w+/i", $content, $matches); + preg_match("/https:\/\/[\w\.]+(\/\w+){1,}\/?/i", $content, $matches); if (!empty($matches)) { $newVideo['url'] = $matches[0]; $done = $done && $this->saveBotTask($newVideo['url']);