Created
August 1, 2019 02:19
-
-
Save yumetodo/861e6910e4df7ab36b160886ecbfefe7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require("node-fetch") | |
const lastWatchDate = 20181222; | |
const main = async () => { | |
const s = await fetch("http://www.ytv.co.jp/conan/data/story.json").then(r => r.json()); | |
const items = s.item.filter(s => s.oaDateId > lastWatchDate).reverse(); | |
let re = ""; | |
for (const item of items) { | |
const storyNum = item.story_num.startsWith("R") ? item.story_num.substring(1) : item.story_num; | |
re += `名探偵コナン第${storyNum}話 ${item.title}` + '\n'; | |
} | |
console.log(re); | |
} | |
main().catch(er => console.error(er)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment