back to iframe
authorClaromes <claromes@hey.com>
Fri, 18 Aug 2023 05:53:26 +0000 (02:53 -0300)
committerClaromes <claromes@hey.com>
Fri, 18 Aug 2023 05:53:26 +0000 (02:53 -0300)
README.md
app.py

index c0b0c5ee5aea7132711fcc0c4ce3e2537f31873b..b9853f95f6d9fbd408aa26b5e826d50afbb904b6 100644 (file)
--- 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 455cda5c5970715b75cdac6c159c138b448e699b..f1e6e8f9b404bf51944a2a6246a17cb4ca0466d5 100644 (file)
--- 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