From b07d7282809cfcd41f8475ea6b94f6ae82da3f21 Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 6 Jun 2023 08:42:57 +0800 Subject: [PATCH] Update format --- func_news.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func_news.py b/func_news.py index 1780ad1..da18812 100644 --- a/func_news.py +++ b/func_news.py @@ -39,7 +39,7 @@ class News(object): fmt_time = time.strftime("%Y年%m月%d日", ts) - news = re.sub(r"([\u2460-\u2473])", r"\n\1", news) + news = re.sub(r"(\d{1,2}、)", r"\n\1", news) fmt_news = "".join(etree.HTML(news).xpath(" // text()")) fmt_news = re.sub(r"周[一|二|三|四|五|六|日]你需要知道的", r"", fmt_news)