Created
January 13, 2017 00:10
-
-
Save wmcraver/83030cfe8a08394512e0d54e59d1d55d to your computer and use it in GitHub Desktop.
Test Web Scraping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rvest) | |
url2 = read_html("http://www.verticalmeasures.com/measurement-reporting/google-analytics-101-best-practices-for-ecommerce-websites/") | |
newxpath = as.character('//*+[contains(concat( " ", @class, " " ), concat( " ", "sidebar-widget", " " ))]//*[contains(concat( " ", @class, " " ), concat( " ", "sidebar-widget", " " ))]//ul') | |
titles = html_nodes(url2, css = "p") | |
titles = html_text(titles) | |
titles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment