MySchedule.py
Updates to the fetching of week codes
這是麥當勞MySchedule網站的 API 包裝器。
安裝:
pip install MySchedule.py
from schedule import ScheduleAPI
from datetime import datetime
api = ScheduleAPI ( "USERID" , "PASSWORD" )
api . login ()
print ( api . get_shifts_for_date ( datetime . now ()))
這將列印出本週的班次。
from schedule import ScheduleAPI
api = ScheduleAPI ( "USERID" , "PASSWORD" )
api . login ()
timecard = api . get_timecard ()
for shift in timecard :
print ( f" { shift . date } Breakdown:" )
print ( f"Duration Clocked In: { shift . time_clocked_in } " )
print ( f"Duration Clocked Out: { shift . time_clocked_out } " )
這將列印每個班次的考勤卡以及您上班和下班的時間明細。