Last active
November 19, 2025 07:48
-
-
Save thc282/518fd1008f6267664af19e959c6e83ab to your computer and use it in GitHub Desktop.
Extract the launcher background
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires AutoHotkey v2.0 | |
| #SingleInstance Force | |
| filePath := "C:\Users\thc282\AppData\Roaming\Cognosphere\HYP\1_1\fedata\Cache\Cache_Data\data_1" | |
| try { | |
| fileContent := FileRead(filePath) | |
| } catch Error as e { | |
| MsgBox "❌ 無法讀取:" e.Message | |
| ExitApp | |
| } | |
| ; 精準匹配 .webm 結尾網址,排除像 .webm:xxx:x 的尾碼 | |
| pattern := "https://[A-Za-z0-9\/._?=&%-]+\.webm" | |
| ; 用 Map 去重 | |
| unique := Map() | |
| pos := 1 | |
| while pos := RegExMatch(fileContent, pattern, &m, pos) { | |
| unique[m[0]] := true | |
| pos := m.Pos(0) + m.Len(0) | |
| } | |
| ; 開啟所有唯一的 URL | |
| for url, _ in unique { | |
| Run url | |
| Sleep 300 ; 可調整開啟間隔 | |
| } | |
| if unique.Count = 0 { | |
| MsgBox "未找到任何 .webm 網址(不含尾碼)。" | |
| ExitApp | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python extractWEBM.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import webbrowser | |
| # 快取檔案路徑(請改成你的檔案) | |
| cache_path = r"C:\Users\thc282\AppData\Roaming\Cognosphere\HYP\1_1\fedata\Cache\Cache_Data\data_1" | |
| # 讀取整個快取檔案 | |
| with open(cache_path, "rb") as f: | |
| binary_data = f.read() | |
| # 嘗試解碼為文字(忽略亂碼) | |
| ascii_data = binary_data.decode('utf-8', errors='ignore') | |
| # 正則表達式:找出 .webm URL(不含冒號尾碼) | |
| pattern = r'https://[^\s:"]+?\.webm\b(?!:)' | |
| matches = re.findall(pattern, ascii_data) | |
| # 去除重複 | |
| unique_urls = list(set(matches)) | |
| # 顯示並開啟 | |
| for url in unique_urls: | |
| print(f"Opening: {url}") | |
| webbrowser.open(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment