I'm trying to scrape page below :
https://metro.zakaz.ua/uk/?promotion=1
This page with react content.
I can scrape first page with code:
url="https://metro.zakaz.ua/uk/?promotion=1"
read_html(url)%>%
html_nodes("script")%>%
.[[8]] %>%
html_text()%>%
fromJSON()%>%
.$catalog%>%.$items%>%
data.frame
In result I have all items from first page, but I don't know how to scrape others pages.
This js code move to other page if that can help:
document.querySelectorAll('.catalog-pagination')[0].children[1].children[0].click()
Thanks for any help!
Try to ajust your code a little i
You will need 'RSelenum' to perform headless navigation.
Check out for setting up: How to set up rselenium for R?
here's a quick output:
Output