From: Claromes Date: Tue, 26 Dec 2023 18:04:36 +0000 (-0300) Subject: add collapse parameter - count function X-Git-Url: https://git.claromes.com/?a=commitdiff_plain;h=e14455c6188ba87d1776b2d9594e6929575e0ddd;p=waybacktweets.git add collapse parameter - count function --- diff --git a/app.py b/app.py index 718c6eb..0c2f973 100644 --- a/app.py +++ b/app.py @@ -195,7 +195,7 @@ def embed(tweet): @st.cache_data(ttl=1800, show_spinner=False) def tweets_count(handle, saved_at): - url = f'https://web.archive.org/cdx/search/cdx?url=https://twitter.com/{handle}/status/*&output=json&from={saved_at[0]}&to={saved_at[1]}' + url = f'https://web.archive.org/cdx/search/cdx?url=https://twitter.com/{handle}/status/*&collapse=timestamp:8&output=json&from={saved_at[0]}&to={saved_at[1]}' try: response = requests.get(url)