diff --git a/cmts_scraper.py b/cmts_scraper.py index 49da09d..b6b2ed2 100644 --- a/cmts_scraper.py +++ b/cmts_scraper.py @@ -363,15 +363,15 @@ async def fetch_raw_config(host: str, username: str, password: str, config_type: # 🌟 新增這行:剛連線成功後,先清空終端機的登入歡迎詞 (MOTD) 與雜訊 await read_until_quiet(timeout=1.0) - # 關鍵修改:根據 config_type 切換模式與指令 + # 關鍵修改:根據 config_type 切換模式與指令,並加上 | nomore 關閉分頁 if config_type == "full": # 1. 先進入 config 模式 process.stdin.write("config\n") await process.stdin.drain() await read_until_quiet(timeout=1.5) # 等待提示字元變成 (config)# - # 2. 下達 full-configuration 指令 - cmd = "show full-configuration" + # 2. 下達 full-configuration 指令 (🌟 加上 | nomore) + cmd = "show full-configuration | nomore" process.stdin.write(f"{cmd}\n") await process.stdin.drain() raw_output = await read_until_quiet(timeout=3.0) @@ -381,8 +381,8 @@ async def fetch_raw_config(host: str, username: str, password: str, config_type: await process.stdin.drain() else: - # running-config 在一般模式即可下達 - cmd = "show running-config" + # running-config 在一般模式即可下達 (🌟 加上 | nomore) + cmd = "show running-config | nomore" process.stdin.write(f"{cmd}\n") await process.stdin.drain() raw_output = await read_until_quiet(timeout=3.0) diff --git a/index.html b/index.html index 12bc2a1..431fad8 100644 --- a/index.html +++ b/index.html @@ -253,81 +253,67 @@ -