I am completely new to scraping, using Windows 10 PC. I am trying to run this code from class to scrape the content of the party platforms form the URLs below:
years=c(1968, 1972, 1976)
urlsR=paste("https://maineanencyclopedia.com/republican-party-platform-",
years,"/",sep='')
urlsD=paste("https://maineanencyclopedia.com/democratic-party-platform-",
years,"/",sep='')
urls=c(urlsR,urlsD)
scraped_platforms <- getURL(urls)
When I run "scraped_platforms" the result is what is shown below rather than the content of the party platforms from the website.
https://maineanencyclopedia.com/republican-party-platform-1968/
""
https://maineanencyclopedia.com/republican-party-platform-1972/
""
https://maineanencyclopedia.com/republican-party-platform-1976/
""
https://maineanencyclopedia.com/democratic-party-platform-1968/
""
https://maineanencyclopedia.com/democratic-party-platform-1972/
""
https://maineanencyclopedia.com/democratic-party-platform-1976/
""
I've seen Windows 10 might be incompatible with getURL (re: How to get getURL to work on R on Windows 10? [tlsv1 alert protocol version]). Even after looking online though, I'm still unclear on how to fix my specific code?
List of links used here:
https://maineanencyclopedia.com/republican-party-platform-1968/
https://maineanencyclopedia.com/republican-party-platform-1972/
https://maineanencyclopedia.com/republican-party-platform-1976/
https://maineanencyclopedia.com/democratic-party-platform-1968/
https://maineanencyclopedia.com/democratic-party-platform-1972/
https://maineanencyclopedia.com/democratic-party-platform-1976/