Skip to content

Commit

Permalink
update app - allow empty date filter
Browse files Browse the repository at this point in the history
  • Loading branch information
claromes committed Jul 17, 2024
1 parent 595a0f8 commit ff434a6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,22 @@ def scroll_page():
collapse = "urlkey"
matchtype = "prefix"

start_timestamp = None
end_timestamp = None

if st.session_state.archived_timestamp_filter:
start_timestamp = st.session_state.archived_timestamp_filter[0]
end_timestamp = st.session_state.archived_timestamp_filter[1]

try:
with st.spinner(
f"Waybacking @{st.session_state.current_username}'s archived tweets"
):
wayback_tweets = wayback_tweets(
st.session_state.current_username,
collapse,
st.session_state.archived_timestamp_filter[0],
st.session_state.archived_timestamp_filter[1],
start_timestamp,
end_timestamp,
limit,
offset,
matchtype,
Expand Down

0 comments on commit ff434a6

Please sign in to comment.