# InstaScraper Scrapes Instagram ## Installation Add this line to your application's Gemfile: ```ruby gem 'insta_scraper' ``` And then execute: $ bundle Or install it yourself as: $ gem install insta_scraper ## Usage Subclasses of InstaScraper::HTML are scraping html endpoints. Subclasses of InstaScraper::JSON are scraping json endpoints. * InstaScraper::HTML::Account ```ruby account = InstaScraper::HTML::Account.new('barna.kovacs.codes') account.data #=> # 4 ``` * InstaScraper::HTML::Media ```ruby media = InstaScraper::HTML::Media.new('BGFVAPPIaBQ') media.data #=> # 1892 ``` * InstaScraper::JSON::Account ```ruby account = InstaScraper::JSON::Account.new('barna.kovacs.codes') account.data #=> # 4 ``` * InstaScraper::JSON::Media ```ruby media = InstaScraper::JSON::Media.new('BGFVAPPIaBQ') media.data #=> # 1892 ``` * InstaScraper::JSON::AccountMedia ```ruby account_media = InstaScraper::JSON::AccountMedia.new('barna.kovacs.codes') # or with params (ex. max_id for offset) # account_media = InstaScraper::JSON::AccountMedia.new('barna.kovacs.codes', max_id: '1261002980537663713_3072962559') account_media.data #=> # [...] ``` * InstaScraper::JSON::MediaComment (deprecated, use MediaCommentStream) ```ruby media_comment = InstaScraper::JSON::MediaComment.new('BLeceL9BZNT', 17843235427151917, 20) # shortcode, last_comment_id, per_page media_comment.data #=> # [# # [#