Skip to content

Commit

Permalink
Update airav_cc.py 去掉简介中*根据分发方式XX
Browse files Browse the repository at this point in the history
  • Loading branch information
yanggang0225 authored Jul 10, 2024
1 parent 929fd1c commit 2022aa7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/models/crawlers/airav_cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''


Expand Down

0 comments on commit 2022aa7

Please sign in to comment.