Created
September 21, 2023 14:47
-
-
Save codepedia-top/f2f2bc39f31b1f9124e4601897a73ab8 to your computer and use it in GitHub Desktop.
onthisDay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import streamlit as st | |
| import requests | |
| from datetime import datetime | |
| now = datetime.now() | |
| month = now.month | |
| day = now.day | |
| api_url = 'https://byabbe.se/on-this-day' | |
| response = requests.get(f'{api_url}/{month}/{day}/events.json') | |
| data = response.json() | |
| for i in data['events']: | |
| del i['wikipedia'] | |
| st.header(f'{data["date"]}') | |
| st.dataframe(data['events']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment