import sys
def main():
with open('trials/index.html', 'r', encoding='utf-8-sig') as f:
content = f.read()
target = """
| 魔神セフィロト討滅戦 / 極セフィロト |
Lv60 (IL190〜/205〜) |
ノーマル / 極 |
三闘神。巨大化後の緑黄デバフタケノコ踏み、巨大パンチ。 |
準備中 |
"""
replacement = """
| 魔神セフィロト討滅戦 / 極セフィロト |
Lv60 (IL190〜/205〜) |
ノーマル / 極 |
三闘神。巨大化後の緑黄デバフタケノコ踏み、巨大パンチ。 |
攻略を見る ➜ |
"""
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('trials/index.html', 'wb') as f:
f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8'))
with open('trials/sephirot.html', 'r', encoding='utf-8-sig') as f:
sephirot = f.read()
sephirot_lines = [line.rstrip() for line in sephirot.splitlines()]
sephirot_clean = '\r\n'.join(sephirot_lines) + '\r\n'
with open('trials/sephirot.html', 'wb') as f:
f.write(b'\xef\xbb\xbf' + sephirot_clean.encode('utf-8'))
print("魔神セフィロト討滅戦のリンク更新および正規化が完了しました。")
if __name__ == '__main__':
main()