Update app3.py

This commit is contained in:
grt1st
2016-11-10 12:47:05 +08:00
committed by GitHub
parent 760bb0a3cc
commit 177c69b14b

View File

@@ -22,7 +22,10 @@ for docs in os.listdir(path):
xml=etree.HTML(html) xml=etree.HTML(html)
if(xml.xpath("//title")):
title=xml.xpath("//title")[0].text.replace(pattern0,'') title=xml.xpath("//title")[0].text.replace(pattern0,'')
else:
continue
author=xml.xpath("//a[@class='author name ng-binding']")[0].text.replace(' ','').replace(' ','').replace('\n','') author=xml.xpath("//a[@class='author name ng-binding']")[0].text.replace(' ','').replace(' ','').replace('\n','')