From f783e4e78ea830331101b6f3bdb9b7ba7b79dfeb Mon Sep 17 00:00:00 2001 From: "t@123654" <1327444968@qq.com> Date: Wed, 23 Jul 2025 16:11:03 +0800 Subject: [PATCH] 1.4.4 1.4.4 --- db.db | 0 driver/wxarticle.py | 4 ++-- jobs/fetch_no_article.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 db.db diff --git a/db.db b/db.db new file mode 100644 index 00000000..e69de29b diff --git a/driver/wxarticle.py b/driver/wxarticle.py index 4dc15903..7883cdeb 100644 --- a/driver/wxarticle.py +++ b/driver/wxarticle.py @@ -94,7 +94,7 @@ class WXArticleFetcher: body=driver.find_element(By.TAG_NAME,"body").text info["content"]=body if "该内容已被发布者删除" in body or "The content has been deleted by the author." in body: - info["content"]="该内容已被发布者删除" + info["content"]="DELETED" raise Exception("该内容已被发布者删除") # 等待关键元素加载 wait.until( @@ -138,7 +138,7 @@ class WXArticleFetcher: # raise Exception(f"文章内容获取失败: {str(e)}") print(f"文章内容获取失败: {str(e)}") print_warning(f"\n\n{body}") - raise + # raise try: # 等待关键元素加载 diff --git a/jobs/fetch_no_article.py b/jobs/fetch_no_article.py index 6e2e6d56..8746dfe3 100644 --- a/jobs/fetch_no_article.py +++ b/jobs/fetch_no_article.py @@ -37,7 +37,7 @@ def fetch_articles_without_content(): if content: # 更新内容 article.content = content - if "该内容已被发布者删除" in content: + if content=="DELETED": print_error(f"获取文章 {article.title} 内容已被发布者删除") article.status = DATA_STATUS.DELETED session.commit()