We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2279e93 commit a9aba20Copy full SHA for a9aba20
internal/domain/mal.go
@@ -127,7 +127,7 @@ func ScrapeMal() {
127
//extensions.Referer(cc)
128
129
as := NewAnimeService(cc)
130
- a := GetAnime(AniDBIDPath)
+ a := updateMalfromAnidb()
131
as.AnimeSlice = a
132
r := regexp.MustCompile(`aid=(\d+)`)
133
as.c.OnHTML("a[href]", func(e *colly.HTMLElement) {
@@ -166,3 +166,19 @@ func ScrapeMal() {
166
167
StoreAnime(as.AnimeSlice, AniDBIDPath)
168
}
169
+
170
+func updateMalfromAnidb() []Anime {
171
+ mal := GetAnime(MalIDPath)
172
173
+ for i := range mal {
174
175
+ animeInfo, exists := typeDateMap[mal[i].MalID]
176
+ if !exists {
177
+ continue
178
+ }
179
180
+ mal[i].AnidbID = animeInfo.AnidbID
181
182
183
+ return mal
184
+}
0 commit comments