import sys
def main():
with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f:
content = f.read()
target = """
| 星霊間欠 ハム島 |
Lv90 (IL620〜) |
対応 |
パッチ6.4メインID。シャーレアン近海。巨大甲殻類、星霊体の連鎖爆発。 |
準備中 |
"""
replacement = """
| 星霊間欠 ハム島 |
Lv90 (IL620〜) |
対応 |
パッチ6.4メインID。シャーレアン近海。巨大甲殻類、星霊体の連鎖爆発。 |
攻略を見る ➜ |
"""
if target not in content:
print("エラー: ターゲット文字列が見つかりません")
sys.exit(1)
content = content.replace(target, replacement)
lines = [line.rstrip() for line in content.splitlines()]
content_clean = '\r\n'.join(lines) + '\r\n'
with open('dungeons/index.html', 'wb') as f:
f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8'))
with open('dungeons/aetherfont.html', 'r', encoding='utf-8-sig') as f:
aet = f.read()
aet_lines = [line.rstrip() for line in aet.splitlines()]
aet_clean = '\r\n'.join(aet_lines) + '\r\n'
with open('dungeons/aetherfont.html', 'wb') as f:
f.write(b'\xef\xbb\xbf' + aet_clean.encode('utf-8'))
print("星霊間欠 ハム島のリンク更新および正規化が完了しました。")
if __name__ == '__main__':
main()