Explorar el Código

festival_reminder.py增加四龙日

罗俊辉 hace 1 año
padre
commit
7a80634bdf
Se han modificado 1 ficheros con 16 adiciones y 0 borrados
  1. 16 0
      app/festival_reminder.py

+ 16 - 0
app/festival_reminder.py

@@ -16,6 +16,8 @@ def bot(festival_info, days_count, date_str):
     level = festival_info["level"]
     festival = festival_info["festival"]
     category = festival_info["category"]
+    if festival == "龙年龙月龙日龙时":
+        date_str ="\n" + date_str + " 07:00-09:00"
     url = "https://open.feishu.cn/open-apis/bot/v2/hook/8eda2f73-e6f5-4fcd-944e-5a34579e1049"
     # url = "https://open.feishu.cn/open-apis/bot/v2/hook/f32c0456-847f-41f3-97db-33fcc1616bcd"
     headers = {"Content-Type": "application/json"}
@@ -405,6 +407,20 @@ class FestivalReminder(object):
                         "category": "节气"
                     }
                 ],
+                "2024-04-22": [
+                    {
+                        "level": "P1",
+                        "festival": "龙年龙月龙日龙时",
+                        "category": "热点"
+                    }
+                ],
+                "2024-05-04": [
+                    {
+                        "level": "P1",
+                        "festival": "龙年龙月龙日龙时",
+                        "category": "热点"
+                    }
+                ],
                 "2024-05-05": [
                     {
                         "level": "P0",