Skip to content

Commit 0e7a3a1

Browse files
authored
Merge pull request #28 from claromes/v1.0rc1
v1.0rc1
2 parents 30a5cc6 + 955a5ab commit 0e7a3a1

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

app/app.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ def scroll_page():
170170

171171
st.image(TITLE, use_column_width="never")
172172
st.caption(
173-
"[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/claromes/waybacktweets?include_prereleases)](https://github.com/claromes/waybacktweets/releases) [![sponsor](https://img.shields.io/badge/Donate-via%20Sponsors-ff69b4.svg?logo=github)](https://github.com/sponsors/claromes)" # noqa: E501
173+
"[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/claromes/waybacktweets?include_prereleases)](https://github.com/claromes/waybacktweets/releases) [![read the documentation](https://img.shields.io/badge/read_the-documentation-0a507a?logo=sphinx)](https://claromes.github.io/waybacktweets) [![sponsors](https://img.shields.io/badge/donate-via%20sponsors-ff69b4.svg?logo=github)](https://github.com/sponsors/claromes)" # noqa: E501
174174
)
175175
st.write(
176-
"Retrieves archived tweets CDX data in HTML (for easy viewing of the tweets using the iframe tag), CSV, and JSON formats." # noqa: E501
176+
"Retrieves archived tweets CDX data in HTML (for easy viewing of the tweets), CSV, and JSON formats." # noqa: E501
177177
)
178178

179179
st.write(
180-
"This application uses the Wayback Tweets Python package, which can be used either as a module or as a standalone command-line tool. [Read the documentation](https://claromes.github.io/waybacktweets) for more information." # noqa: E501
180+
"For better performance, use the CLI version, available on [PyPI](https://pypi.org/project/waybacktweets)." # noqa: E501
181181
)
182182

183183
st.write(
@@ -246,27 +246,20 @@ def scroll_page():
246246
if username != st.session_state.current_username:
247247
st.session_state.current_username = username
248248

249-
if st.session_state.query or st.session_state.count:
249+
if (st.session_state.query and username) or st.session_state.count:
250250
if unique:
251251
collapse = "urlkey"
252252
matchtype = "prefix"
253253

254-
start_timestamp = None
255-
end_timestamp = None
256-
257-
if st.session_state.archived_timestamp_filter:
258-
start_timestamp = st.session_state.archived_timestamp_filter[0]
259-
end_timestamp = st.session_state.archived_timestamp_filter[1]
260-
261254
try:
262255
with st.spinner(
263256
f"Waybacking @{st.session_state.current_username}'s archived tweets"
264257
):
265258
wayback_tweets = wayback_tweets(
266259
st.session_state.current_username,
267260
collapse,
268-
start_timestamp,
269-
end_timestamp,
261+
st.session_state.archived_timestamp_filter[0],
262+
st.session_state.archived_timestamp_filter[1],
270263
limit,
271264
offset,
272265
matchtype,
@@ -370,6 +363,9 @@ def scroll_page():
370363
If the problem persists [open an issue](https://github.com/claromes/waybacktweets/issues).""" # noqa: E501
371364
)
372365
st.stop()
366+
except IndexError:
367+
st.error("Please check if you have entered a date range in the filter.")
368+
st.stop()
373369
except Exception as e:
374370
st.error(str(e))
375371
st.stop()

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Pre-release: |release|
1111

1212
Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing (see :ref:`field_options`), and saves the data in HTML, for easy viewing of the tweets using the iframe tags, CSV, and JSON formats.
1313

14-
.. image:: https://img.shields.io/badge/Donate-via%20Sponsors-ff69b4.svg?logo=github
14+
.. image:: https://img.shields.io/badge/donate-via%20sponsors-ff69b4.svg?logo=github
1515
:target: https://github.com/sponsors/claromes
16-
:alt: GitHub Sponsors
16+
:alt: sponsors
1717

1818
.. note::
1919
Intensive queries can lead to rate limiting, resulting in a temporary ban of a few minutes from web.archive.org.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "waybacktweets"
3-
version = "1.0rc"
3+
version = "1.0rc1"
44
description = "Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing, and saves the data."
55
authors = ["Claromes <[email protected]>"]
66
license = "GPLv3"

0 commit comments

Comments
 (0)