Fixed import script
This commit is contained in:
parent
4c29afa84f
commit
ee04951f0e
@ -8,17 +8,12 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/animenotifier/mal"
|
"github.com/animenotifier/arn"
|
||||||
|
|
||||||
"github.com/aerogo/nano"
|
|
||||||
"github.com/animenotifier/mal/parser"
|
"github.com/animenotifier/mal/parser"
|
||||||
)
|
)
|
||||||
|
|
||||||
var node = nano.New(5000)
|
|
||||||
var db = node.Namespace("mal").RegisterTypes((*mal.Anime)(nil))
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
defer node.Close()
|
defer arn.Node.Close()
|
||||||
|
|
||||||
// readFile("../mal-crawler/files/anime-31240.html")
|
// readFile("../mal-crawler/files/anime-31240.html")
|
||||||
|
|
||||||
@ -61,7 +56,7 @@ func readFile(name string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(anime.ID, anime.Title)
|
fmt.Println(anime.ID, anime.Title)
|
||||||
db.Set("Anime", anime.ID, anime)
|
arn.MAL.Set("Anime", anime.ID, anime)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user