import sys
def main():
with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f:
content = f.read()
target = """
| 近東秘宝 アルザダール海底遺跡群 |
Lv90 (IL565〜) |
対応 |
パッチ6.1メインID。海底神殿の秘宝、からくり兵士の射線回避。 |
準備中 |
"""
replacement = """
| 近東秘宝 アルザダール海底遺跡群 |
Lv90 (IL565〜) |
対応 |
パッチ6.1メイン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/alzadaals_legacy.html', 'r', encoding='utf-8-sig') as f:
alz = f.read()
alz_lines = [line.rstrip() for line in alz.splitlines()]
alz_clean = '\r\n'.join(alz_lines) + '\r\n'
with open('dungeons/alzadaals_legacy.html', 'wb') as f:
f.write(b'\xef\xbb\xbf' + alz_clean.encode('utf-8'))
print("近東秘宝 アルザダール海底遺跡群のリンク更新および正規化が完了しました。")
if __name__ == '__main__':
main()