Logstash input plugin for Instagram Streaming API

拥有回忆 提交于 2019-12-11 04:46:59

问题


I want to read events from the Instagram. I was wondering if I can do it using Logstash similar to reading events from Twitter using Twitter input plugin, but there is no input plugin for Instagram. Is there any other way to collect Instagram data using Logstash?

Thanks!


回答1:


Instagram has an API so you can definitely attempt something with the http_poller plugin.

Something like this:

input {
   http_poller {
      urls => {
         search => {
            method => get
            url => "https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN"
         }
      }
      request_timeout => 60
      interval => 60
      codec => "json"
   }
}
output {
   stdout {
       codec => rubydebug
   }
}



回答2:


What's your mean of Instagram events?

If you want to store your Insta media, write a plugin for your browser or write a crawler and send media to elasticsearch



来源:https://stackoverflow.com/questions/38864201/logstash-input-plugin-for-instagram-streaming-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!