Skip to content

Commit 79c876d

Browse files
committed
2022.03.29 例行更新
1 parent 0d170f8 commit 79c876d

File tree

6 files changed

+20824
-20824
lines changed

6 files changed

+20824
-20824
lines changed

国内版.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ def saveJSON(data, filename):
118118
json.dump(data, f, ensure_ascii=False, indent=4)
119119

120120
def main():
121-
# url = "https://leetcode-cn.com/api/problems/all/"
122-
# html = json.loads(get_proble_set(url))
123-
# problemset = html["stat_status_pairs"]
124-
# saveJSON(html, "[cn]json1-origin-data.json")
125-
# saveJSON(problemset, "[cn]json2-problemset.json")
121+
url = "https://leetcode-cn.com/api/problems/all/"
122+
html = json.loads(get_proble_set(url))
123+
problemset = html["stat_status_pairs"]
124+
saveJSON(html, "[cn]json1-origin-data.json")
125+
saveJSON(problemset, "[cn]json2-problemset.json")
126126

127-
problemset = json.load(open("[cn]json2-problemset.json", 'r', encoding='utf-8'))
127+
# problemset = json.load(open("[cn]json2-problemset.json", 'r', encoding='utf-8'))
128128
parse_proble_set(problemset)
129129

130130

国外版.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ def saveJSON(data, filename):
101101
json.dump(data, f, ensure_ascii=False, indent=4)
102102

103103
def main():
104-
# url = "https://leetcode.com/api/problems/all/"
105-
# html = json.loads(get_proble_set(url))
106-
# problemset = html["stat_status_pairs"]
107-
# saveJSON(html, "[en]json1-origin-data.json")
108-
# saveJSON(problemset, "[en]json2-problemset.json")
104+
url = "https://leetcode.com/api/problems/all/"
105+
html = json.loads(get_proble_set(url))
106+
problemset = html["stat_status_pairs"]
107+
saveJSON(html, "[en]json1-origin-data.json")
108+
saveJSON(problemset, "[en]json2-problemset.json")
109109

110-
problemset = json.load(open("[en]json2-problemset.json", 'r', encoding='utf-8'))
110+
# problemset = json.load(open("[en]json2-problemset.json", 'r', encoding='utf-8'))
111111
parse_proble_set(problemset)
112112

113113

0 commit comments

Comments
 (0)