From c2148b3302e92a1a3f17761f6b3f3d1b523bea1a Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Tue, 12 Apr 2022 23:31:27 +0800 Subject: [PATCH] Update zhihu.py --- language_learning/2021.11.17_zhihu/zhihu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language_learning/2021.11.17_zhihu/zhihu.py b/language_learning/2021.11.17_zhihu/zhihu.py index 2a0374b..fc2d78f 100644 --- a/language_learning/2021.11.17_zhihu/zhihu.py +++ b/language_learning/2021.11.17_zhihu/zhihu.py @@ -51,11 +51,11 @@ for href in match_href_new: f.write(str(href)) # 文章链接 f.write('\">') f.write(str(title.get_text()[:-5])) - f.write('  ') + f.write('  ') author = soup.find("span", {"class": "UserLink AuthorInfo-name"}) f.write(str(author.get_text()+'  ')) post_time = soup.find("div", {"class" : "ContentItem-time"}) - f.write(str(post_time.get_text()[4:-6])+'

') + f.write(str(post_time.get_text()[4:-6])+'

') except: pass f.close() \ No newline at end of file