Improved season link tool
This commit is contained in:
parent
8180b59e92
commit
e7426a3e7f
@ -2,16 +2,27 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
func main() {
|
||||
list := []*arn.Anime{}
|
||||
|
||||
for anime := range arn.StreamAnime() {
|
||||
if anime.NSFW == 1 || anime.Status != "current" || anime.StartDate == "" || anime.StartDate < "2017-09" || anime.StartDate > "2017-10-17" {
|
||||
if anime.NSFW == 1 || anime.Status != "current" || anime.Type != "tv" || anime.StartDate == "" || anime.StartDate < "2017-12" || anime.StartDate > "2018-02-01" {
|
||||
continue
|
||||
}
|
||||
|
||||
list = append(list, anime)
|
||||
}
|
||||
|
||||
sort.Slice(list, func(i, j int) bool {
|
||||
return list[i].Popularity.Total() > list[j].Popularity.Total()
|
||||
})
|
||||
|
||||
for _, anime := range list {
|
||||
fmt.Printf("* [%s](/anime/%s)\n", anime.Title.Canonical, anime.ID)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user