Skip to content

Instantly share code, notes, and snippets.

@breim
Last active September 26, 2015 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save breim/9e9ff8fa459311c561d8 to your computer and use it in GitHub Desktop.
Save breim/9e9ff8fa459311c561d8 to your computer and use it in GitHub Desktop.
Crawler insta
# Acessar o usuário
https://api.instagram.com/v1/users/489110643/media/recent?client_id=df78ad1c73eb4cf88247732ca3aa7f2c
#Buscar usuário ;)
https://api.instagram.com/v1/users/search?q=neymarjr&access_token=17992263.f59def8.9ac9b1030f614ae6877508043ba89af6
#Seguindo os usuários
https://api.instagram.com/v1/users/333/follows?client_id=df78ad1c73eb4cf88247732ca3aa7f2c#
https://api.instagram.com/v1/tags/barkbox?access_token=17992263.f59def8.9ac9b1030f614ae6877508043ba89af6
https://api.instagram.com/v1/tags/barkbox/media/recent?access_token=17992263.f59def8.9ac9b1030f614ae6877508043ba89af6
https://api.instagram.com/v1/media/17992263?access_token=17992263.f59def8.9ac9b1030f614ae6877508043ba89af6
https://api.instagram.com/v1/media/?access_token=ACCESS-TOKEN
# Access Token for feed
https://api.instagram.com/v1/users/26669533/feed?access_token=17992263.f59def8.9ac9b1030f614ae6877508043ba89af6
require 'mechanize'
json = Mechanize.new.get('https://api.instagram.com/v1/users/search?q=neymarjr&access_token=17992263.f59def8.9ac9b1030f614ae6877508043ba89af6').body
result = JSON.parse json
result['data'].count
result['data'][0]['username'] #nome do insta
result['data'][0]['bio'] #bio do user
result['data'][0]['website'] # site do user
result['data'][0]['profile_picture'] #imagem do bunitin
result['data'][0]['full_name'] #nome completo
result['data'][0]['id'] #id do titio
require 'mechanize'
json = Mechanize.new.get('https://api.instagram.com/v1/users/26669533/media/recent?client_id=df78ad1c73eb4cf88247732ca3aa7f2c').body
result = JSON.parse json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment