floresfdev / instagram-r-scraper

Instagram scraper in R using a third-party Java lib.
5 stars 1 forks source link
instagram java r rstats scraper

Instagram R scraper

Scrape Instagram using the instagram-java-scraper Java library in R.

Based on the project of postaddictme.

Dependencies

To run Java applications you need the Java Runtime Environment.

To execute Java code in R you need to install the package rJava from CRAN:

install.packages("rJava")

Instructions

1) Configure the settings at the top of the script scraper.R:

## User account to scrape
user_account <- "berlinphil"

## Max number of posts to retrieve
media_count <- as.integer(100)

2) Run the script:

source("scraper.R")

3) Find the output datasets in the ./dataout/ directory.