feat(matrix): 「第一条视频」改成主页最新一条,即使不在监控目标里
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s

之前取的是本任务已有作品里**最早**的那条 —— 既不是主页上看到的第一条,
也只看得到被监控的那批链接。现在采集时对每个博主额外问一次作品列表
(倒序,只要第一条),把它的发布时间落进账号快照;矩阵优先用它,没问到
时退回库里最新的一条作品。

- 作品模式:每个博主每轮一次请求,同轮内去重;连接超时重试一次。
- 博主模式:本来就在拉作品列表,直接用其中的最新时间。
- 新列 monitor_creator_stat.latest_published_at(毫秒,可空)。
This commit is contained in:
2026-11-02 10:31:45 +08:00
parent c06848ae98
commit 34a962f75a
7 changed files with 180 additions and 26 deletions
+4
View File
@@ -411,6 +411,10 @@ class MonitorCreatorStat(MonitorBase):
total_favorited: Mapped[Optional[int]] = mapped_column(BigInteger)
works_count: Mapped[Optional[int]] = mapped_column(BigInteger)
following: Mapped[Optional[int]] = mapped_column(BigInteger)
# 这个博主**主页上最新一条视频**的发布时间(毫秒)。作品列表是按时间倒序的,
# 「第一条」就是最新那条 —— 它可能根本不在监控的目标里(自然发的、别的活动发的),
# 但能回答「他最近还发不发」。拿不到(接口挡了/超时)就留 None。
latest_published_at: Mapped[Optional[int]] = mapped_column(BigInteger)
captured_at: Mapped[int] = mapped_column(BigInteger, nullable=False, index=True)