Open villegar opened 1 year ago
Hi Villegar,
Thank you for sharing your script. I was wondering if you could help modify the google_maps function to include a new feature? Specifically, could it be adapted to load the entire comment when a comment is truncated and displays a “Read more” button? Here’s an example for reference.
Thanks again for your assistance!
# Function to click all "Read more" links
click_read_more <- function(driver) {
repeat {
read_more_buttons <- driver$findElements(using = "css selector", ".w8nwRe.kyuRq")
if (length(read_more_buttons) == 0) {
break
}
for (button in read_more_buttons) {
button$clickElement()
Sys.sleep(1) # Small delay to ensure click is registered
}
Sys.sleep(2) # Wait for new content to load after clicking
}
}
There are cases in which the comment associated to a review has been written using a different language (other than English), Google automatically translates these comments:
In such cases, it would be useful to separate the comments into
original
andtranslated
columns, or at least to offer the option to separate these comments.