From 2022aa7fdab5da48af98f4cff26be0d9e9d3663c Mon Sep 17 00:00:00 2001 From: yanggangHub <132535087+yanggang0225@users.noreply.github.com> Date: Wed, 10 Jul 2024 22:38:29 +0800 Subject: [PATCH] =?UTF-8?q?Update=20airav=5Fcc.py=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E7=AE=80=E4=BB=8B=E4=B8=AD*=E6=A0=B9=E6=8D=AE=E5=88=86?= =?UTF-8?q?=E5=8F=91=E6=96=B9=E5=BC=8FXX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/crawlers/airav_cc.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/models/crawlers/airav_cc.py b/src/models/crawlers/airav_cc.py index 5562c8c..44d8f96 100644 --- a/src/models/crawlers/airav_cc.py +++ b/src/models/crawlers/airav_cc.py @@ -100,6 +100,14 @@ def get_cover(html): def get_outline(html): # result = html.xpath('//span[@itemprop="description"]/text()') result = html.xpath('//div[@class="video-info"]/p/text()')#更新 + if result:#更新 + index = result[0].find('*根')#更新,去掉简介中“*根据分发方式XXX”后面的内容 + if index !=-1:#更新 + return result[0][:index].strip()#更新 + else:#更新 + return result[0].strip()#更新 + else:#更新 + return ''#更新 return result[0] if result else ''