更新公司介绍提取逻辑,增加对新XPath路径的支持
This commit is contained in:
parent
688e7fb3f7
commit
05591129b9
@ -13,6 +13,9 @@ def extract_company_data(xpathobj):
|
||||
intro_list = [t.strip() for t in xpathobj.xpath('//div[@class="company_img_auto"]/p/text()') if t.strip()]
|
||||
if not intro_list:
|
||||
intro_list = [t.strip() for t in xpathobj.xpath('//div[@class="company_img_auto"]/text()') if t.strip()]
|
||||
if not intro_list:
|
||||
intro_list = [t.strip() for t in xpathobj.xpath('//div[@class="company_img_auto"]/p/span/text()') if t.strip()]
|
||||
|
||||
introduction = "\r\n".join(intro_list)
|
||||
|
||||
# 如果没有名称或介绍,直接忽略
|
||||
|
Loading…
x
Reference in New Issue
Block a user