Skip to content

Basic Example

Dan Vassallo edited this page Jun 7, 2017 · 4 revisions

Standard Hashtag Scrape Example:

#basic use case
scrape_result = InstaScrape.hashtag("test")
scrape_result.each do |post|
  puts post.image
  puts post.link
  puts post.text
end

Long Scrape a hashtag and get additional metadata:

#you can set include_meta_data to false if
#you want to speed up the scrape
scrape_result = InstaScrape.long_scrape_hashtag('test', 1, include_meta_data: true)
scrape_result.each do |post|
  puts post.image
  puts post.link
  puts post.text
  puts post.date
  puts post.username
  puts post.hi_res_image
  puts post.likes
end
Clone this wiki locally