From c8fb3a2faf804c5b00c7dc89c84fa118e765f6c4 Mon Sep 17 00:00:00 2001 From: shmilylty Date: Wed, 28 Aug 2019 17:16:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=87=E9=A2=98=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oneforall/common/request.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/oneforall/common/request.py b/oneforall/common/request.py index 59ce25c..49b072f 100644 --- a/oneforall/common/request.py +++ b/oneforall/common/request.py @@ -110,7 +110,11 @@ def get_title(markup): if len(markup) <= 200: return markup.strip() - return soup.text.strip() + text = soup.text + if len(text) <= 200: + return text.strip() + + return None def request_callback(future, index, datas):