@pieterjanvc
Hello again! Thank you so much for your help, it is incredibly kind of you! The script works wonderfully and itâs a lot faster than before as well! And thank you for making it possible for me to scrape the dates.
At first when I tried to run your code in RStudio, I had some troubles with the "mdy"-function and the "str_trim"-funtion, but those were solved once I installed the "stringr"-package ( and added âlibrary(âstringrâ)â to the script) and the "lubridate"-package.
However, I encountered a problem with two books of which I tried to scrape the reviews. For Deloume Road (https://www.goodreads.com/book/show/7504988-deloume-road?ac=1&from_search=true&qid=wEtGAysS9h&rank=1) and Tales from the Mall (https://www.goodreads.com/book/show/13637188-tales-from-the-mall) I got the same error â I include one of them here:
message(paste("PAGE", pageNumber, "of", nPages, "Processed"))
+ Sys.sleep(2)
+ }
Error in `$<-.data.frame`(`*tmp*`, "review", value = c("Tales from the Mall is a mad mix of fascinating facts, statistics, historical background, fictionalised accounts based on real interviews and actual short stories - all revolving around shopping malls. Just like shopping malls, the book sometimes confused me, overstimulated me and satiated any sense of voyeurism I may harbour (shopping centres are fab for people watching.... and so is this book!) - and certainly never bored me. Some of the short stories (whether or not they were based on fact or\n Tales from the Mall is a mad mix of fascinating facts, statistics, historical background, fictionalised accounts based on real interviews and actual short stories - all revolving around shopping malls. Just like shopping malls, the book sometimes confused me, overstimulated me and satiated any sense of voyeurism I may harbour (shopping centres are fab for people watching.... and so is this book!) - and certainly never bored me. Some of the short stories (whether or not they were based on fact or fiction) were exceptionally well written, and I was very disappointed when they ended. I've never read anything else by Ewan Morrison, but based on the short stories, I'd be keen to read a novel written by him. The well researched historical background, rich with stats and figures was interesting, but the most fascinating factual chapters were all about the psychological manipulation that is applied in the design, lay-out and even staffing of the malls and the shops within. I don't tend to frequent shopping centres very often, but the next time I do, it will be with a much more critical and aware mind. Thanks, Mr Morrison, for the great stories and many eye-openers on such an interesting aspect of our culture, society, and even geography.", :
replacement has 25 rows, data has 26
> #end of the main loop
I would like to ask one last things, though I would understand of course, if it isnât possible or if youâre to busy. I would like to ask is whether you think it might be possible to somehow make it possible to decide which reviews are scraped? At the moment, the Goodreads page opens and (seemingly randomly) automatically shows only the English reviews or the reviews for âall languagesâ. It would be very practical if I could manually type into the script which ones I want, so it remains consistent which reviews are scraped.
Once again thank you for you help and guidance, it is very much appreciated!