Alvaro commited on
Commit
d794d20
·
1 Parent(s): fbbef30

Update main.py

Browse files
Files changed (1) hide show
  1. src/scrape/main.py +6 -6
src/scrape/main.py CHANGED
@@ -22,16 +22,16 @@ def main():
22
 
23
  # --- Step 1: Scrape Events and Fights ---
24
  print("\n--- Starting Events and Fights Scraping ---")
25
- # all_events_data = scrape_all_events()
26
- # with open(events_json_path, 'w') as f:
27
- # json.dump(all_events_data, f, indent=4)
28
  print(f"Scraping for events complete. Data saved to {events_json_path}")
29
 
30
  # --- Step 2: Scrape Fighters ---
31
  print("\n--- Starting Fighters Scraping ---")
32
- # all_fighters_data = scrape_all_fighters()
33
- # with open(fighters_json_path, 'w') as f:
34
- # json.dump(all_fighters_data, f, indent=4)
35
  print(f"Scraping for fighters complete. Data saved to {fighters_json_path}")
36
 
37
  # --- Step 3: Convert JSON to CSV ---
 
22
 
23
  # --- Step 1: Scrape Events and Fights ---
24
  print("\n--- Starting Events and Fights Scraping ---")
25
+ all_events_data = scrape_all_events()
26
+ with open(events_json_path, 'w') as f:
27
+ json.dump(all_events_data, f, indent=4)
28
  print(f"Scraping for events complete. Data saved to {events_json_path}")
29
 
30
  # --- Step 2: Scrape Fighters ---
31
  print("\n--- Starting Fighters Scraping ---")
32
+ all_fighters_data = scrape_all_fighters()
33
+ with open(fighters_json_path, 'w') as f:
34
+ json.dump(all_fighters_data, f, indent=4)
35
  print(f"Scraping for fighters complete. Data saved to {fighters_json_path}")
36
 
37
  # --- Step 3: Convert JSON to CSV ---