Beta 10.1 修复FC2元数据提取异常

This commit is contained in:
wenead99 2019-06-18 18:11:04 +08:00 committed by GitHub
parent 222337a5f0
commit 759e546534
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,8 @@ def getTitle(htmlcode): #获取厂商
#print(htmlcode)
html = etree.fromstring(htmlcode,etree.HTMLParser())
result = str(html.xpath('/html/body/div[2]/div/div[1]/h3/text()')).strip(" ['']")
return result
result2 = str(re.sub('\D{2}2-\d+','',result)).replace(' ','',1)
return result2
def getStudio(htmlcode): #获取厂商
html = etree.fromstring(htmlcode,etree.HTMLParser())
result = str(html.xpath('/html/body/div[2]/div/div[1]/h5[3]/a[1]/text()')).strip(" ['']")