From 7f32cd8086e54b56dcc852294b279ec194718bd5 Mon Sep 17 00:00:00 2001 From: Claromes Date: Wed, 31 May 2023 03:04:07 -0300 Subject: [PATCH] improve msgs --- README.md | 1 - app.py | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6a70de2..e134950 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ Streamlit will be served at http://localhost:8501 - [ ] Range size defined by user - [ ] Prevent duplicate URLs - [ ] Hide Twitter header banner (iframe) -- [ ] Grid - [ ] Contributing/ Docs - [ ] Changelog - [ ] `parse_links` exception diff --git a/app.py b/app.py index c879072..7bd1c05 100644 --- a/app.py +++ b/app.py @@ -3,7 +3,7 @@ import datetime import streamlit as st import streamlit.components.v1 as components -__version__ = '0.1.2.1' +__version__ = '0.1.3' st.set_page_config( page_title='Wayback Tweets', @@ -122,7 +122,11 @@ def attr(i): {}. **Wayback Machine:** [link]({}) | **MIME Type:** {} | **From:** {} | **Tweet:** [link]({}) '''.format(i+1, link, mimetype[i], datetime.datetime.strptime(timestamp[i], "%Y%m%d%H%M%S"), tweet_links[i])) -st.title('Wayback Tweets [![GitHub release (latest by date)](https://img.shields.io/github/v/release/claromes/waybacktweets)](https://github.com/claromes/waybacktweets/releases)', anchor=False) +st.title(''' +Wayback Tweets +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/claromes/waybacktweets)](https://github.com/claromes/waybacktweets/releases) +[![Star](https://img.shields.io/github/stars/claromes/waybacktweets?style=social)](https://github.com/claromes/waybacktweets) +''', anchor=False) st.write('Search archived tweets on Wayback Machine in an easy way') handle = st.text_input('username', placeholder='username', label_visibility='collapsed') @@ -222,5 +226,9 @@ if query or handle: if not links: st.error('Unable to query the Wayback Machine API.') except TypeError as e: - st.error('{}. Refresh this page and try again.'.format(e)) + st.error(''' + {}. Refresh this page and try again. + + If the problem persists [open an issue](https://github.com/claromes/waybacktweets/issues) or send me a [tweet](https://twitter.com/compose/tweet?text=@claromes). + '''.format(e)) st.session_state.current_index = 0 \ No newline at end of file -- 2.34.1