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 } " )
这将打印每个班次的考勤卡以及您上班和下班的时间明细。