This commit is contained in:
2019-11-18 18:58:30 +09:00
parent f3c14a4ed6
commit cfac7b6204
5 changed files with 1 additions and 66 deletions

View File

@ -1,31 +0,0 @@
package main
import (
"fmt"
"time"
"github.com/akyoto/color"
"github.com/animenotifier/notify.moe/arn"
)
func main() {
color.Yellow("Refreshing anime characters...")
defer color.Green("Finished.")
defer arn.Node.Close()
rateLimiter := time.NewTicker(500 * time.Millisecond)
for anime := range arn.StreamAnime() {
<-rateLimiter.C
chars, err := anime.RefreshAnimeCharacters()
if err != nil {
color.Red(err.Error())
continue
}
fmt.Printf("%s %s (%d characters)\n", anime.ID, anime.Title.Canonical, len(chars.Items))
}
}