debug-novel-task

This commit is contained in:
make
2025-06-19 13:13:36 +08:00
parent f7afa16a40
commit 1664db7a3a
2 changed files with 10 additions and 3 deletions

View File

@@ -96,11 +96,11 @@ class ChapterPage extends BasePage
} else {
$this->arrChapterInfo['c_page_data'] = NULL;
if(config('log.task_debug_log_open_status')){
$incKey = config('task.app_name').'_getChapterInfo_lastread_null:' . date('Y-m-d');
$this->redisDailyInc($incKey);
if(config('log.task_debug_log_open_status')){
// 记录失败原因
\think\facade\Log::error("Request getChapterInfo_lastread == NULL , c_page_data == NULL, ");
}

View File

@@ -296,6 +296,13 @@ class Site
continue;
}
// 如果不匹配有这个 说明没有请求到小说章节 或者 章节为空
$strPattern = "/lastread\.set\((.*?)\);/";
if (!preg_match($strPattern, $strContent, $arrMatches)) {
var_dump(mb_substr($strContent, 0, 300)); // 防止输出太长
continue;
}
$ChapterPage = $this->getChapterPage($this, $arrFilter[$intKey]['uri']);
$ChapterPage->setContent($strContent);
$ChapterPage->setData($arrFilter[$intKey]);