I want to scrape the US apps of Play Store, but I am in Brazil. How can I fake my location using R? I am using Firefox.
This is my code:
urls <- c('https://play.google.com/store/apps/collection/cluster?clp=0g4jCiEKG3RvcHNlbGxpbmdfZnJlZV9BUFBMSUNBVElPThAHGAM%3D:S:ANO1ljKs-KA&gsr=CibSDiMKIQobdG9wc2VsbGluZ19mcmVlX0FQUExJQ0FUSU9OEAcYAw%3D%3D:S:ANO1ljL40zU',
'https://play.google.com/store/apps/collection/cluster?clp=0g4jCiEKG3RvcHNlbGxpbmdfcGFpZF9BUFBMSUNBVElPThAHGAM%3D:S:ANO1ljLdnoU&gsr=CibSDiMKIQobdG9wc2VsbGluZ19wYWlkX0FQUExJQ0FUSU9OEAcYAw%3D%3D:S:ANO1ljIKVpg',
'https://play.google.com/store/apps/collection/cluster?clp=0g4fCh0KF3RvcGdyb3NzaW5nX0FQUExJQ0FUSU9OEAcYAw%3D%3D:S:ANO1ljLe6QA&gsr=CiLSDh8KHQoXdG9wZ3Jvc3NpbmdfQVBQTElDQVRJT04QBxgD:S:ANO1ljKx5Ik',
'https://play.google.com/store/apps/collection/cluster?clp=0g4cChoKFHRvcHNlbGxpbmdfZnJlZV9HQU1FEAcYAw%3D%3D:S:ANO1ljJ_Y5U&gsr=Ch_SDhwKGgoUdG9wc2VsbGluZ19mcmVlX0dBTUUQBxgD:S:ANO1ljL4b8c',
'https://play.google.com/store/apps/collection/cluster?clp=0g4cChoKFHRvcHNlbGxpbmdfcGFpZF9HQU1FEAcYAw%3D%3D:S:ANO1ljLtt38&gsr=Ch_SDhwKGgoUdG9wc2VsbGluZ19wYWlkX0dBTUUQBxgD:S:ANO1ljJCqyI',
'https://play.google.com/store/apps/collection/cluster?clp=0g4YChYKEHRvcGdyb3NzaW5nX0dBTUUQBxgD:S:ANO1ljLhYwQ&gsr=ChvSDhgKFgoQdG9wZ3Jvc3NpbmdfR0FNRRAHGAM%3D:S:ANO1ljIKta8')
flw_rk <- vector("list", length(urls))
df_total_rk = data.frame()
selCommand <- wdman::selenium(jvmargs = c("-Dwebdriver.firefox.verboseLogging=true"), retcommand = TRUE)
shell(selCommand, wait = FALSE, minimized = TRUE)
remDr <- remoteDriver(port = 4567L, browserName = "firefox")
remDr$open()
for (i in urls){
remDr$navigate(i)
for(j in 1:5){
remDr$executeScript(paste("scroll(0,",j*10000,");"))
Sys.sleep(3)
}
html_obj <- remDr$getPageSource(header = TRUE)[[1]] %>% read_html()
names <- html_obj %>% html_nodes(".WsMG1c.nnK0zc") %>% html_text()
flw_rk[[i]] <- data.frame(names = names, stringsAsFactors = F)
}
Just use a Virtual Private Network(VPN). No need for over-complicated solutions. I found one that is free and works best for me. Here's the link to the Google Play Store App:
https://play.google.com/store/apps/details?id=free.vpn.unblock.proxy.turbovpn
Also, You could try to download a VPN extension from the Mozilla Add-on store. Here's the link:
https://addons.mozilla.org/en-US/firefox/addon/setupvpn/
EDIT
This add-on will work for an unlimited amount of time. This is what I think will be the best choice for you now.
https://addons.mozilla.org/en-US/firefox/addon/touch-vpn/?src=search