From 7f7b1dae28cbe827bb0e2b4cda21017c3907941b Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Sat, 24 Sep 2022 19:50:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/cms.py | 9 ++++++--- js/version.txt | 2 +- readme.md | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/controllers/cms.py b/controllers/cms.py index 791b871..501a6e7 100644 --- a/controllers/cms.py +++ b/controllers/cms.py @@ -1036,7 +1036,7 @@ class CMS: 'list': [] } logger.info(f'{self.getName()}获取详情页耗时:{get_interval(t1)}毫秒,发生错误:{e}') - print(result) + # print(result) return result def searchContent(self, key, fypage=1,show_name=False): @@ -1094,7 +1094,7 @@ class CMS: if is_json: html = self.dealJson(html) html = json.loads(html) - # print(html) + if not is_json and html.find('输入验证码') > -1: cookie = verifyCode(url,self.headers,self.timeout,self.retry_count,self.ocr_api) # cookie = '' @@ -1107,6 +1107,9 @@ class CMS: r = requests.get(url, headers=self.headers, timeout=self.timeout) r.encoding = self.encoding html = r.text + if not show_name and not html.find(key) > -1: + logger.info('搜索结果源码未包含关键字,疑似搜索失败,正为您打印结果源码') + print(html) items = pdfa(html,p[0].replace('json:','',1)) # print(len(items),items) @@ -1141,7 +1144,7 @@ class CMS: "vod_content": content, # 无用参数 }) except Exception as e: - print(e) + print(f'搜索列表解析发生错误:{e}') pass # print(videos) except Exception as e: diff --git a/js/version.txt b/js/version.txt index cbbb5ee..b21f0b7 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.7.7 \ No newline at end of file +3.7.8 \ No newline at end of file diff --git a/readme.md b/readme.md index f37a974..8f320f3 100644 --- a/readme.md +++ b/readme.md @@ -51,6 +51,7 @@ - [X] 2.二级渲染功能拆分,js单独调用 - [X] 3.v3.7.6 新增优酷源(pluto专用) - [X] 4.v3.7.7 新增酷云77源(pluto专用),新增猫了个咪源,优化request等方法的post参数传递,增加rc函数 +- [X] 5.v3.7.8 增加单一搜索无匹配关键字自动打印源码,注释进入二级详情页的日志打印 ###### 2022/09/22 - [X] 1.v3.7.3修复静态文件阿里token没渲染的bug,修复数据库升级bug,优化app.py - [X] 2.v3.7.4修复自定义drives合并配置报错问题 -- GitLab