From 79a0f243ece76d6590491aaa5c5d3676440b3078 Mon Sep 17 00:00:00 2001 From: Claromes Date: Fri, 18 Aug 2023 02:53:26 -0300 Subject: [PATCH] back to iframe --- README.md | 1 + app.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c0b0c5e..b9853f9 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Streamlit will be served at http://localhost:8501 - [ ] `parse_links` exception - [ ] Add current page to page title - [ ] Parse MIME type `warc/revisit` +- [ ] Parse MIME type `text/plain` - [ ] Filter by period/datetime - [ ] Apply filters by API endpoints - [ ] Add contributing guidelines diff --git a/app.py b/app.py index 455cda5..f1e6e8f 100644 --- a/app.py +++ b/app.py @@ -267,16 +267,16 @@ if query or handle: if mimetype[i] == 'text/html': st.error('Tweet has been deleted.') - response_html = requests.get(link) - content = response_html.text - - components.html(content, height=500, scrolling=True) + components.iframe(link, height=500, scrolling=True) st.divider() - if mimetype[i] == 'warc/revisit': st.warning('''MIME Type was not parsed.''') + st.divider() + if mimetype[i] == 'text/plain': + st.warning('''MIME Type was not parsed.''') + st.divider() start_index = st.session_state.offset -- 2.34.1