From 759e546534f2f4d6a77de88f0d3b0ec7114fdf16 Mon Sep 17 00:00:00 2001 From: wenead99 <42309414+wenead99@users.noreply.github.com> Date: Tue, 18 Jun 2019 18:11:04 +0800 Subject: [PATCH] =?UTF-8?q?Beta=2010.1=20=E4=BF=AE=E5=A4=8DFC2=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8F=90=E5=8F=96=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fc2fans_club.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fc2fans_club.py b/fc2fans_club.py index 27482e7..a74ecb9 100644 --- a/fc2fans_club.py +++ b/fc2fans_club.py @@ -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(" ['']")