LoginSignup
13
13

More than 5 years have passed since last update.

node.jsのrequestを使って今日放送するアニメ一覧を取得してみる。

Last updated at Posted at 2014-03-28

アニメマップ
こちらのAPIを使用させて頂き、本日放送予定のアニメ情報を取得してみる。

coffee
request = require("request")

options =
  url: 'http://animemap.net/api/table/tokyo.json'
  json: true

request.get options, (err, res, body) ->
  return console.log err if err
  for json in body.response.item
    if json.today is '1'
      console.log json.title
      console.log '  放送局:' + json.station
      console.log '  時間:' +  json.time

結果
のうりん
  放送局:MX
  時間:25:00
Wake Up Girls!
  放送局:テレビ東京
  時間:25:23
鬼灯の冷徹
  放送局:TBS
  時間:25:55

今回は東京のデータを取得しましたが、全都道府県分の放送情報があるみたいです。
どこの放送が一番速いのか取得してみると面白いかもしれない。
あ、この3作全部最終回らしいです。お見逃しなく。

13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13