30 lines
984 B
Python
30 lines
984 B
Python
import sys
|
|
|
|
with open('dungeons/index.html', 'r', encoding='utf-8') as f:
|
|
text = f.read()
|
|
|
|
target = ''' <tr>
|
|
<td><strong>古城アムダプール (Hard)</strong></td>
|
|
<td>Lv50 (IL90〜)</td>
|
|
<td>非対応</td>
|
|
<td>真菌汚染。ボギー、ボジャノイド。</td>
|
|
<td>準備中</td>
|
|
</tr>'''
|
|
|
|
replacement = ''' <tr>
|
|
<td><strong>古城アムダプール (Hard)</strong></td>
|
|
<td>Lv50 (IL90〜)</td>
|
|
<td>非対応</td>
|
|
<td>真菌汚染。ボギー、ボジャノイド。</td>
|
|
<td><a href="amdapor_keep_hard.html">攻略を見る ➜</a></td>
|
|
</tr>'''
|
|
|
|
if target in text:
|
|
text = text.replace(target, replacement)
|
|
with open('dungeons/index.html', 'w', encoding='utf-8') as f:
|
|
f.write(text)
|
|
print("Updated amdapor_keep_hard in dungeons/index.html")
|
|
else:
|
|
print("Target not found!")
|
|
sys.exit(1)
|