优化标题获取

This commit is contained in:
shmilylty
2019-08-28 17:16:14 +08:00
parent c9208b61dd
commit c8fb3a2faf
+5 -1
View File
@@ -110,7 +110,11 @@ def get_title(markup):
if len(markup) <= 200: if len(markup) <= 200:
return markup.strip() 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): def request_callback(future, index, datas):