mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-01 12:53:27 +08:00
2022.03.29 例行更新
This commit is contained in:
12
国内版.py
12
国内版.py
@@ -118,13 +118,13 @@ def saveJSON(data, filename):
|
||||
json.dump(data, f, ensure_ascii=False, indent=4)
|
||||
|
||||
def main():
|
||||
# url = "https://leetcode-cn.com/api/problems/all/"
|
||||
# html = json.loads(get_proble_set(url))
|
||||
# problemset = html["stat_status_pairs"]
|
||||
# saveJSON(html, "[cn]json1-origin-data.json")
|
||||
# saveJSON(problemset, "[cn]json2-problemset.json")
|
||||
url = "https://leetcode-cn.com/api/problems/all/"
|
||||
html = json.loads(get_proble_set(url))
|
||||
problemset = html["stat_status_pairs"]
|
||||
saveJSON(html, "[cn]json1-origin-data.json")
|
||||
saveJSON(problemset, "[cn]json2-problemset.json")
|
||||
|
||||
problemset = json.load(open("[cn]json2-problemset.json", 'r', encoding='utf-8'))
|
||||
# problemset = json.load(open("[cn]json2-problemset.json", 'r', encoding='utf-8'))
|
||||
parse_proble_set(problemset)
|
||||
|
||||
|
||||
|
12
国外版.py
12
国外版.py
@@ -101,13 +101,13 @@ def saveJSON(data, filename):
|
||||
json.dump(data, f, ensure_ascii=False, indent=4)
|
||||
|
||||
def main():
|
||||
# url = "https://leetcode.com/api/problems/all/"
|
||||
# html = json.loads(get_proble_set(url))
|
||||
# problemset = html["stat_status_pairs"]
|
||||
# saveJSON(html, "[en]json1-origin-data.json")
|
||||
# saveJSON(problemset, "[en]json2-problemset.json")
|
||||
url = "https://leetcode.com/api/problems/all/"
|
||||
html = json.loads(get_proble_set(url))
|
||||
problemset = html["stat_status_pairs"]
|
||||
saveJSON(html, "[en]json1-origin-data.json")
|
||||
saveJSON(problemset, "[en]json2-problemset.json")
|
||||
|
||||
problemset = json.load(open("[en]json2-problemset.json", 'r', encoding='utf-8'))
|
||||
# problemset = json.load(open("[en]json2-problemset.json", 'r', encoding='utf-8'))
|
||||
parse_proble_set(problemset)
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user