json: rename file, always work up to max_episode

This commit is contained in:
mappu04 2023-06-15 19:49:23 +12:00
parent edf934c6a6
commit 06b01baef6
1 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,4 @@
#!/usr/bin/php
<?php
error_reporting(E_ALL);
@ -69,9 +70,11 @@ function parse_episode($html) {
function main() {
$max_episode = intval(file_get_contents('max_episode'));
$ret = [];
for($i = 1; $i < 601; ++$i) {
$html = file_get_contents('running-pages/'.$i);
for($i = 1; $i < $max_episode+1; ++$i) {
$html = file_get_contents('original-html/'.$i);
$info = parse_episode($html);
$ret[$i] = $info;
}