pjxcharya commited on
Commit
6a07611
·
verified ·
1 Parent(s): 93e79d1

Update scripts/leetcode_fetch.py

Browse files
Files changed (1) hide show
  1. scripts/leetcode_fetch.py +8 -7
scripts/leetcode_fetch.py CHANGED
@@ -2,12 +2,13 @@ import json
2
  import os
3
 
4
  def run_lc_sync(mode):
5
- # logic for 'daily', 'sync', etc.
6
- # For demonstration, we simulate the 'daily' output
7
- daily_data = {"id": 1, "title": "Example Problem", "difficulty": "Medium"}
8
 
9
- output_path = f"lc_{mode}.json"
10
- with open(output_path, "w") as f:
11
- json.dump(daily_data, f)
 
 
12
 
13
- return output_path
 
2
  import os
3
 
4
  def run_lc_sync(mode):
5
+ # Your LeetCode logic here...
6
+ output_filename = f"lc_{mode}_data.json"
 
7
 
8
+ # Dummy data for example
9
+ data = {"status": "success", "mode": mode, "problems": []}
10
+
11
+ with open(output_filename, "w") as f:
12
+ json.dump(data, f)
13
 
14
+ return os.path.abspath(output_filename)