From 3e1d951af8bdcf2dbdf4512b7c9475eba87b9a8a Mon Sep 17 00:00:00 2001 From: lededev Date: Tue, 28 Sep 2021 18:36:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebCrawler/xcity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WebCrawler/xcity.py b/WebCrawler/xcity.py index 01de367..a7b4cff 100644 --- a/WebCrawler/xcity.py +++ b/WebCrawler/xcity.py @@ -109,7 +109,8 @@ def getTag(a): for i in result1: i=i.replace(u'\n','') i=i.replace(u'\t','') - result2.append(i) + if len(i): + result2.append(i) return result2