Scrape Instagram using the instagram-java-scraper Java library in R.
Based on the project of postaddictme.
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")
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.