json: rename file, always work up to max_episode
This commit is contained in:
parent
edf934c6a6
commit
06b01baef6
@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
@ -69,9 +70,11 @@ function parse_episode($html) {
|
|||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
||||||
|
$max_episode = intval(file_get_contents('max_episode'));
|
||||||
|
|
||||||
$ret = [];
|
$ret = [];
|
||||||
for($i = 1; $i < 601; ++$i) {
|
for($i = 1; $i < $max_episode+1; ++$i) {
|
||||||
$html = file_get_contents('running-pages/'.$i);
|
$html = file_get_contents('original-html/'.$i);
|
||||||
$info = parse_episode($html);
|
$info = parse_episode($html);
|
||||||
$ret[$i] = $info;
|
$ret[$i] = $info;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user