Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# v0.1.8
# get_media method bug fixed
# v0.1.7
# get_user method bug fixed

Expand All @@ -10,4 +12,4 @@
# Some refactoring

# v0.1.0
# Initial commit.
# Initial commit.
4 changes: 2 additions & 2 deletions lib/ruby-instagram-scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def self.get_media ( code )
url = "#{BASE_URL}/p/#{ code }/?__a=1"
params = ""

JSON.parse( open( "#{url}#{params}" ).read )["media"]
JSON.parse( open( "#{url}#{params}" ).read )["graphql"]["shortcode_media"]
end

def self.get_media_comments ( shortcode, count = 40, before = nil )
Expand All @@ -55,4 +55,4 @@ def self.get_media_comments ( shortcode, count = 40, before = nil )
JSON.parse( open( url ).read )["comments"]
end

end
end
6 changes: 3 additions & 3 deletions ruby-instagram-scraper.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# encoding: utf-8
Gem::Specification.new do |s|
s.name = 'ruby-instagram-scraper'
s.version = '0.1.7'
s.date = '2016-05-31'
s.version = '0.1.8'
s.date = '2017-12-13'
s.summary = "A simple module for requests to Instagram without an API key."
s.description = "A simple module for requests to Instagram without an API key."
s.authors = [ "Sergey Borodanov" ]
Expand All @@ -12,4 +12,4 @@ Gem::Specification.new do |s|
s.test_files = [ "test/ruby_instagram_scraper_test.rb" ]
s.homepage = 'https://github.com/sborod/ruby-instagram-scraper'
s.license = 'MIT'
end
end
4 changes: 2 additions & 2 deletions test/ruby_instagram_scraper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

describe "when request a media" do
it "must has equal code in field" do
RubyInstagramScraper.get_media( "vKQeMNu7H1" )["code"].must_equal "vKQeMNu7H1"
RubyInstagramScraper.get_media( "vKQeMNu7H1" )["shortcode"].must_equal "vKQeMNu7H1"
end
end

Expand All @@ -39,4 +39,4 @@
end
end

end
end