|
26 | 26 | raise Exception("File is not exist")
|
27 | 27 |
|
28 | 28 |
|
29 |
| -json_data = get( |
30 |
| - f"https://solved.ac/api/v3/problem/show?problemId={problem_num}", headers={"Accept": "application/json"} |
31 |
| -).json() |
| 29 | +# json_data = get( |
| 30 | +# f"https://solved.ac/api/v3/problem/show?problemId={problem_num}", headers={"Accept": "application/json"} |
| 31 | +# ).json() |
32 | 32 |
|
33 | 33 |
|
34 | 34 | algos = []
|
35 |
| -for tag in json_data.get("tags"): |
36 |
| - for tag_info in tag.get("displayNames"): |
37 |
| - if tag_info.get("language") == "ko": |
38 |
| - algos.append({"name": tag_info.get("name")}) |
| 35 | +# for tag in json_data.get("tags"): |
| 36 | +# for tag_info in tag.get("displayNames"): |
| 37 | +# if tag_info.get("language") == "ko": |
| 38 | +# algos.append({"name": tag_info.get("name")}) |
39 | 39 |
|
40 | 40 | cores = ["브론즈", "실버", "골드", "플레티넘", "다이아몬드", "루비"]
|
41 | 41 | levels = [1, 5, 4, 3, 2]
|
42 |
| -N = json_data.get("level") |
43 |
| -core = cores[(N - 1) // 5] |
44 |
| -level = levels[N % 5] |
| 42 | +# N = json_data.get("level") |
| 43 | +# core = cores[(N - 1) // 5] |
| 44 | +# level = levels[N % 5] |
45 | 45 |
|
46 |
| -title = f"{problem_num}_{json_data['titleKo']}" |
| 46 | + |
| 47 | +# title = f"{problem_num}_{json_data['titleKo']}" |
| 48 | +title = f"{problem_num}_" |
47 | 49 |
|
48 | 50 | kst = timezone("Asia/Seoul")
|
49 | 51 |
|
|
55 | 57 | new_record = {
|
56 | 58 | "상태": {"type": "select", "select": {"name": "해결"}},
|
57 | 59 | "문제 링크": {"type": "url", "url": f"https://www.acmicpc.net/problem/{problem_num}"},
|
58 |
| - "단계": {"type": "multi_select", "multi_select": [{"name": f"{core} {level}"}]}, |
| 60 | + # "단계": {"type": "multi_select", "multi_select": [{"name": f"{core} {level}"}]}, |
59 | 61 | "날짜": {"type": "date", "date": {"start": now_date, "end": None, "time_zone": None}},
|
60 | 62 | "깃헙 링크": {"type": "url", "url": f"https://github.com/{repo}/blob/{branch}/{filename}"},
|
61 | 63 | "사람": {"type": "people", "people": [{"object": "user", "id": getenv("NOTION_SELF_ID")}]},
|
62 | 64 | "출처": {"type": "multi_select", "multi_select": [{"name": "백준"}]},
|
63 |
| - "알고리즘 분류": {"type": "multi_select", "multi_select": algos}, |
| 65 | + # "알고리즘 분류": {"type": "multi_select", "multi_select": algos}, |
64 | 66 | "문제명": {
|
65 | 67 | "id": "title",
|
66 | 68 | "type": "title",
|
|
0 commit comments