diff --git a/output/about/index.md b/output/about/index.md index 93070fae..8f3b823d 100644 --- a/output/about/index.md +++ b/output/about/index.md @@ -14,20 +14,18 @@ Notes are excluded if they meet any of the following criteria: We also attempt to filter out notes for deleted tweets and non-English tweets. -{% if site.data.meta.total_notes %} +{% if site.data.meta.total_tweets %} --- #### Tweet indexing status -{% assign perc_fetched = site.data.meta.total_fetched | times: 100 | divided_by: site.data.meta.total_notes %} +{% assign perc_fetched = site.data.meta.total_fetched | times: 100 | divided_by: site.data.meta.total_tweets %} -
-
{{ perc_fetched }}% ({{ site.data.meta.total_fetched }} / {{ site.data.meta.total_notes }})
+
+
{{ perc_fetched }}% ({{ site.data.meta.total_fetched }} / {{ site.data.meta.total_tweets }})
-{{ perc_fetched }}% of notes have an indexed tweet (or the tweet has been deleted). - -This means the text of these tweets is searchable. +{{ perc_fetched }}% of tweets are searchable. {% endif %} diff --git a/x_notes/meta.py b/x_notes/meta.py index 9f14b903..1dcf179f 100644 --- a/x_notes/meta.py +++ b/x_notes/meta.py @@ -32,7 +32,7 @@ def update_meta_from_notes(notes: dict[str, dict[str, Any]]) -> None: update = { "scraped_at": datetime.now(timezone.utc).isoformat(), "most_recent": list(notes.values())[0]["created_at"], - "total_notes": len(notes), - "total_fetched": len([1 for note in notes.values() if "dl" in note]), + "total_tweets": len({note["tweet_id"] for note in notes}), + "total_fetched": len({note["tweet_id"] for note in notes if "dl" in note}), } update_meta(update) diff --git a/x_notes/tweets.py b/x_notes/tweets.py index 3cdd2956..d88de926 100644 --- a/x_notes/tweets.py +++ b/x_notes/tweets.py @@ -96,8 +96,8 @@ async def fetch_tweets() -> None: update_meta( { "locked_until": locked_until, - "total_notes": len(notes), - "total_fetched": len([1 for note in notes.values() if "dl" in note]), + "total_tweets": len({note["tweet_id"] for note in notes}), + "total_fetched": len({note["tweet_id"] for note in notes if "dl" in note}), } )