Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
R Web Scraping Quick Start Guide

You're reading from   R Web Scraping Quick Start Guide Techniques and tools to crawl and scrape data from websites

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789138733
Length 114 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Olgun Aydin Olgun Aydin
Author Profile Icon Olgun Aydin
Olgun Aydin
Arrow right icon
View More author details
Toc

Step-by-step web scraping with RSelenium

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.

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&quot...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime