feat: 黄金のレガシー最新ダンジョン「オリジェニクス」「ユウェヤーワータ」完全攻略ページの作成と一覧リンク更新

This commit is contained in:
armonica committed 2026-10-29 12:06:23 +09:00
1 parent 79985d0d12
commit 67677f81b2
4 files changed
+700 -5

No files matched your search

+10 -3
View File
@@ -28,10 +28,17 @@ def update_dungeon_entry(name_keyword, url):
c = f.read().decode('utf-8', errors='ignore')
if f'href="{url}"' not in c:
c = c.replace('\r\n', '\n')
c = re.sub(rf'({re.escape(name_keyword)}</strong>.*?<td>)準備中(</td>)', rf'\g<1><a href="{url}">攻略を見る ➜</a>\2', c, flags=re.DOTALL)
c = re.sub(rf'({re.escape(name_keyword)}.*?<td>)準備中(</td>)', rf'\g<1><a href="{url}">攻略を見る ➜</a>\2', c, flags=re.DOTALL)
clean_and_save(path_idx, c)
print(f"Updated {name_keyword} in {path_idx}")
else:
print(f"Already updated {name_keyword}")
if __name__ == '__main__':
clean_and_save('dungeons/vanguard.html', open('dungeons/vanguard.html', 'r', encoding='utf-8', errors='ignore').read())
update_dungeon_entry('巨大要塞 ヴァンガード', 'vanguard.html')
# 1. yuweyawata.html を正規化保存
raw_content = open('dungeons/yuweyawata.html', 'rb').read().decode('utf-8', errors='ignore')
clean_and_save('dungeons/yuweyawata.html', raw_content)
print("Cleaned and saved dungeons/yuweyawata.html")
# 2. dungeons/index.html を更新
update_dungeon_entry('ユウェヤーワータ', 'yuweyawata.html')