이게 더 효율적이지 않나요?
This commit is contained in:
parent
468676c432
commit
a3a18b8a90
1 changed files with 17 additions and 16 deletions
33
app/run.py
33
app/run.py
|
|
@ -27,6 +27,23 @@ print("🍪 | Account information was successfully retrieved.")
|
|||
print("📅 | Getting MLSV_YMD Timestamp")
|
||||
print("📅 | Date:", MLSV_YMD)
|
||||
|
||||
# Check if today is the last day of the month
|
||||
오늘 = datetime.today()
|
||||
내일 = 오늘 + timedelta(days=1)
|
||||
|
||||
if 내일.month != 오늘.month:
|
||||
print("📅 | Today is the last day of the month.")
|
||||
print("📆 | Uploading School Event Post")
|
||||
학사일정_경로 = lib.학사일정_얻기(MLSV_YMD)
|
||||
cl.photo_upload(
|
||||
학사일정_경로,
|
||||
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
||||
extra_data={'is_paid_partnership': False}
|
||||
)
|
||||
print("📆 | School Event Post Uploaded")
|
||||
else:
|
||||
print("📅 | Today is not the last day of the month.")
|
||||
|
||||
print("🍲 | Getting Meal Info Image")
|
||||
lib.얻기(MLSV_YMD)
|
||||
|
||||
|
|
@ -53,22 +70,6 @@ lib.디스코드(MLSV_YMD)
|
|||
print("🗨️ | Uploaded at Discord")
|
||||
|
||||
print(f"📆 | Today Date : {MLSV_YMD}")
|
||||
# Check if today is the last day of the month
|
||||
오늘 = datetime.today()
|
||||
내일 = 오늘 + timedelta(days=1)
|
||||
|
||||
if 내일.month != 오늘.month:
|
||||
print("📅 | Today is the last day of the month.")
|
||||
print("📆 | Uploading School Event Post")
|
||||
학사일정_경로 = lib.학사일정_얻기(MLSV_YMD)
|
||||
cl.photo_upload(
|
||||
학사일정_경로,
|
||||
caption=f"#인천상정중학교 #상정중학교 #학사일정 \n{내일.strftime("%Y")}년 {내일.strftime("%m")}월 학사일정",
|
||||
extra_data={'is_paid_partnership': False}
|
||||
)
|
||||
print("📆 | School Event Post Uploaded")
|
||||
else:
|
||||
print("📅 | Today is not the last day of the month.")
|
||||
|
||||
print("🎉 | All tasks completed.")
|
||||
# Calculate running time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue