How can I check my session cookies and specify those cookies before making a subsequent web request?
I want to scrape a page but I cannot submit the cookies.
I'm using the rvest library.
My code:
library(rvest)
WP <- html_session("http://www.wp.pl/")
headers <- httr::headers(WP)
cookies <- unlist(headers[names(headers) == "set-cookie"])
crumbs <- stringr::str_split_fixed(cookies, "; ", 4)
# method 1
stringr::str_split_fixed(crumbs[, 1], "=", 2)
# method 2
cookies(WP)
How do I set my cookies to do the web scraping?