1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-12-17 09:47:44 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add 国内版 Python代码

This commit is contained in:
2022-03-27 20:23:18 +08:00
parent 44cb2b9989
commit e2daac1e0a
2 changed files with 145 additions and 8 deletions

View File

@@ -29,7 +29,6 @@ def parse_proble_set(problemSet):
#construct_url(title)
# time.sleep(0.5)
time.sleep(1)
# time.sleep(random.randint(0,9) / 10)
t =threading.Thread(target=construct_url,args=(title,))
t.start()
@@ -108,13 +107,6 @@ def main():
# saveJSON(html, "[en]json1-origin-data.json")
# saveJSON(problemset, "[en]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")
# exit()
problemset = json.load(open("[en]json2-problemset.json", 'r', encoding='utf-8'))
parse_proble_set(problemset)