Updated MAL tools

This commit is contained in:
2018-10-30 08:59:35 +09:00
parent a9abcf0efb
commit a559227b65
2 changed files with 16 additions and 5 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"compress/gzip"
"errors"
"fmt"
"os"
@ -36,7 +37,7 @@ func main() {
return nil
}
if !strings.HasSuffix(name, ".html") {
if !strings.HasSuffix(name, ".html.gz") {
return nil
}
@ -53,7 +54,15 @@ func readFile(name string) error {
}
defer file.Close()
anime, characters, err := malparser.ParseAnime(file)
reader, err := gzip.NewReader(file)
if err != nil {
fmt.Println(err)
return err
}
anime, characters, err := malparser.ParseAnime(reader)
if err != nil {
fmt.Println(err)