ttttdiva commited on
Commit
a9a8ba3
·
verified ·
1 Parent(s): 35684ef

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -6
main.py CHANGED
@@ -6,9 +6,7 @@ app = FastAPI()
6
 
7
  @app.on_event("startup")
8
  async def on_startup():
9
- """
10
- アプリ起動時に、外部ページを読み込んで MHTML を保存。
11
- """
12
  url = "https://civitai.com/models/1055452/akashicpulse"
13
  output_path = "akashicpulse.mhtml"
14
 
@@ -23,12 +21,10 @@ async def on_startup():
23
 
24
  await browser.close()
25
 
26
- # MHTMLをファイルに書き出し
27
  with open(output_path, "w", encoding="utf-8") as f:
28
  f.write(snapshot)
29
 
30
- print(f"[INFO] MHTML saved to: {os.path.abspath(output_path)}")
31
-
32
  except Exception as e:
33
  print(f"[ERROR] Failed to save MHTML: {e}")
34
 
 
6
 
7
  @app.on_event("startup")
8
  async def on_startup():
9
+ print("===== Application Startup =====")
 
 
10
  url = "https://civitai.com/models/1055452/akashicpulse"
11
  output_path = "akashicpulse.mhtml"
12
 
 
21
 
22
  await browser.close()
23
 
 
24
  with open(output_path, "w", encoding="utf-8") as f:
25
  f.write(snapshot)
26
 
27
+ print(f"[INFO] MHTML saved to {os.path.abspath(output_path)}")
 
28
  except Exception as e:
29
  print(f"[ERROR] Failed to save MHTML: {e}")
30