Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yumetodo/861e6910e4df7ab36b160886ecbfefe7 to your computer and use it in GitHub Desktop.
Save yumetodo/861e6910e4df7ab36b160886ecbfefe7 to your computer and use it in GitHub Desktop.
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