This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib.request | |
import datetime | |
def get_recent_weekday(): | |
today = datetime.date.today() | |
if today.weekday() == 5: # 토요일이면 금요일로 | |
today -= datetime.timedelta(days=1) | |
elif today.weekday() == 6: # 일요일이면 금요일로 | |
today -= datetime.timedelta(days=2) |