feat(web): up avatars, follower count, and dedupe views/avg secondary

This commit is contained in:
kairee committed 2026-11-01 14:34:23 +08:00
1 parent 1ed3746f4b
commit 2ff3e7952b
23 files changed
+209 -58

No files matched your search

+6 -3
View File
@@ -182,6 +182,8 @@ def test_up_queries():
assert ups["items"][0]["video_count"] == 2
assert ups["items"][0]["total_views"] == 6400
assert ups["items"][0]["avg_views"] == 3200.0
assert ups["items"][0]["up_face"] == "https://i0.hdslb.com/bfs/face/a.jpg"
assert ups["items"][0]["follower_latest"] == 12345
one = q.list_ups(min_videos=2)
assert one["total"] == 1
@@ -190,6 +192,7 @@ def test_up_queries():
assert detail["video_count"] == 2
assert detail["total_views"] == 6400
assert detail["blacklisted"] is False
assert detail["up_face"] == "https://i0.hdslb.com/bfs/face/a.jpg"
assert detail["series"]["dates"] == list(DATES)
assert detail["series"]["views"] == [6000, 6200, 6400]
assert detail["space_url"].endswith("/1")
@@ -454,7 +457,7 @@ def test_about_payload():
assert about["snapshot_days"] == 3
assert about["snapshot_first_date"] == DATES[0]
assert about["fans_start_date"] == DATES[0]
assert about["schema_version"] == 5
assert about["schema_version"] == 6
assert about["analytics"] == {
"min_duration_seconds": 600,
"maturity_days": 2,
@@ -464,8 +467,8 @@ def test_about_payload():
}
assert about["heat_weights"]["view"] == 0.30
assert about["followers"]["videos_total"] == 3
assert about["followers"]["videos_covered"] == 0
assert about["followers"]["videos_missing"] == 3
assert about["followers"]["videos_covered"] == 3
assert about["followers"]["videos_missing"] == 0
assert about["folders"][0]["media_id"] == 3700023351
assert about["preview"] is False
finally: