In this part, we are going to focus on collecting data from Instagram by using RSelenium. First of all, we are going to navigate the URL of the Instagram post, and collects comments and parses comments to detect users who put comments and users who are mentioned.
Step-by-step web scraping with RSelenium
Collecting data with RSelenium
Let's start collecting data from Instagram by using the RSelenium library. First of all, we have to load the RSelenium library using the following command:
#loading libraries
library(RSelenium)
Now we load Selenium drivers and start Selenium. It may take time, so please wait till loading finishes:
#loading drivers and starting selenium
rD <- rsDriver()
remDr <- rD[["client"...