1 parent 65c8fcc commit 1dfe193Copy full SHA for 1dfe193
1 file changed
Nameday/src/main.py
@@ -0,0 +1,14 @@
1
+from datetime import date
2
+import requests
3
+import json
4
+
5
+def main():
6
+ today = date.today().strftime("%Y/%m/%d")
7
+ url = f"https://sholiday.faboul.se/dagar/v2.1/{today}"
8
+ response = requests.get(url)
9
+ response = response.text
10
+ data = json.loads(response)
11
+ print(data["dagar"][0]["namnsdag"])
12
13
+if __name__ == "__main__":
14
+ main()
0 commit comments