mirror of
https://github.com/rachelos/we-mp-rss.git
synced 2026-09-21 13:50:34 +08:00
1.4.4 1.4.4
This commit is contained in:
+2
-2
@@ -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:
|
||||
# 等待关键元素加载
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user