Init
This commit is contained in:
commit
bf706e58d8
14 changed files with 297 additions and 0 deletions
43
app/run.py
Normal file
43
app/run.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
from instagrapi import Client
|
||||
import json, os
|
||||
from datetime import datetime, timedelta
|
||||
import library.lib as lib
|
||||
|
||||
start_time = datetime.now()
|
||||
|
||||
print("🍪 | Retrieving saved account information.")
|
||||
cl = Client(json.load(open('./cookies.json')))
|
||||
print("🍪 | Account information was successfully retrieved.")
|
||||
|
||||
print("📅 | Getting MLSV_YMD Timestamp")
|
||||
MLSV_YMD = str((datetime.now() + timedelta(days=1)).strftime('%Y%m%d'))
|
||||
print("📅 | Date:", MLSV_YMD)
|
||||
|
||||
print("🍲 | Getting Meal Info Image")
|
||||
lib.얻기(MLSV_YMD)
|
||||
|
||||
path = f"{os.getenv("ROOT")}temp/{MLSV_YMD}.png"
|
||||
|
||||
print("📸 | Uploading Story")
|
||||
cl.photo_upload_to_story(
|
||||
path=path,
|
||||
caption=f"#인천상정중학교 #상정중학교 #급식 \n{MLSV_YMD}일자 급식",
|
||||
extra_data = {'is_paid_partnership' : False}
|
||||
)
|
||||
print("📸 | Story Uploaded")
|
||||
|
||||
print("🖼️ | Uploading Post")
|
||||
cl.photo_upload(
|
||||
path,
|
||||
caption=f"#인천상정중학교 #상정중학교 #급식 \n{MLSV_YMD}일자 급식",
|
||||
extra_data = {'is_paid_partnership' : False}
|
||||
)
|
||||
print("🖼️ | Post Uploaded")
|
||||
|
||||
print("🗨️ | Uploading at Discord")
|
||||
lib.디스코드(MLSV_YMD)
|
||||
print("🗨️ | Uploaded at Discord")
|
||||
|
||||
print("🎉 | All tasks completed.")
|
||||
# calculate running time
|
||||
print("🕒 | Running Time:", datetime.now() - start_time)
|
||||
Loading…
Add table
Add a link
Reference in a new issue