Hi, I want to transfer products on my wholesaler's site, I have been working for a month, I want to download products and transfer them to exell, if you help, I would really appreciate my codes as follows
#Loading the rvest package
library('rvest')
#Specifying the url for desired website to be scraped
url <- 'https://www.vadibilisim.com/cantalar'
#Reading the HTML code from the website
webpage <- read_html(url)
#Using CSS selectors to scrape the rankings section
rank_data_html <- html_nodes(webpage,'.urunBaslik')
#Converting the ranking data to text
rank_data <- html_text(rank_data_html)
#Let's have a look at the rankings
head(rank_data)
#Data-Preprocessing: Converting rankings to numerical
rank_data<-as.numeric(rank_data)
#Let's have another look at the rankings
head(rank_data)
#Using CSS selectors to scrape the title section
title_data_html <- html_nodes(webpage,'#adetsecim')
#Converting the title data to text
title_data <- html_text(title_data_html)
#Let's have a look at the title
head(title_data)
For starters, the rvest package site has some nice tutorials to help you get started. For example, the SelectorGadget article has nice tips on how to pull from a page the content you'd like.
You're also going to want to get into pagination with rvest. Thankfully your website has a pretty easy page scheme (https://www.vadibilisim.com/cantalar/{page_number}), so you can just run a loop to go through all the pages.
That tutorial has tips like how to pull text with html_text.