[洽特] 發布 HentaiVerse 戰鬥數值讀取器 (HV)

看板AC_In (裏洽 18+動漫)作者 (安穩殘憶)時間1周前 (2025/08/16 12:58), 6天前編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
PyPI: https://pypi.org/project/hv-bie/ Github: https://github.com/Kuan-Lun/hv-bie 此套件將 HentaiVerse 戰鬥頁面的 HTML 原始碼字串解析為結構化的 Python 資料類別( dataclasses)。該套件僅為靜態頁面解析之工具,無與頁面互動之操作,符合 ehwiki 條 目中 Forbidden Actions 之規範。 安裝 可以透過 PyPI 安裝: pip install hv-bie 範例 from hv_bie import parse_snapshot # 讀取你的戰鬥頁面 HTML(字串) html = # e.g. driver.page_source snap: BattleSnapshot = parse_snapshot(html) # 玩家資訊 print(snap.player.hp_value, snap.player.hp_percent) print("Spirit Stance" in snap.player.buffs) # 技能/法術 for name, sk in snap.abilities.skills.items(): print(name, sk.available, sk.cost_type, sk.cost, sk.cooldown_turns) # 怪物清單 for idx, m in snap.monsters.items(): print(idx, m.name, m.alive, m.system_monster_type, m.hp_percent) # 戰報(由舊到新)與回合資訊 print(snap.log.current_round, "/", snap.log.total_round) print(snap.log.lines[0], "->", snap.log.lines[-1]) # 道具與快捷列 print("Health Draught" in snap.items.items) print(len(snap.items.quickbar)) # 序列化 print(snap.as_dict()) print(snap.to_json()) 相關文件 API 規格書:https://github.com/Kuan-Lun/hv-bie/blob/main/API_SPEC.md 軟體需求規格:https://github.com/Kuan-Lun/hv-bie/blob/main/SRS.md 授權 以 AGPL-3.0-or-later 授權釋出。 -- 聽音樂都 wav 看影片都 avi 看圖檔都 bmp 拍張照都 raw -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.229.66.207 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/AC_In/M.1755320287.A.8DC.html ※ 編輯: Glamsight (36.229.66.207 臺灣), 08/16/2025 13:08:33
文章代碼(AID): #1ee0_VZS (AC_In)
文章代碼(AID): #1ee0_VZS (AC_In)