Skip to content

Commit

Permalink
kpop
Browse files Browse the repository at this point in the history
  • Loading branch information
kenu committed Apr 7, 2024
1 parent e1968ef commit 6ad6099
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cron-youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,15 @@ channels['food'][0].forEach(async (channelId) => {
await dao.createYoutube(data)
})
})

channels['kpop'][0].forEach(async (channelId) => {
const videos = await getLatestVideos(channelId)
const channel = await dao.findOneByChannelId(channelId)
if (!channel) {
return
}
videos?.forEach(async (data) => {
data.ChannelId = channel.id
await dao.createYoutube(data)
})
})

0 comments on commit 6ad6099

Please sign in to comment.