Text mining in Amazon product review using R. I wasn't able to extract the particular product's review Text mining on Amazon product review using R Program. I wasn't able to extract the particular product's review(i.e.If iphone 11 has 6k review, I need to extract all of it.) I'm getting only one column labelled x.

Please let me know where I need to make necessary changes. I need those for performing sentiment analysis.
install.packages(&quot;rvest&quot;)

library(rvest)

install.packages(&quot;xml2&quot;)

library(xml2)

install.packages(&quot;magrittr&quot;)

library(magrittr)

url &lt;-&quot;https://www.amazon.in/Apple-iPhone-11-128GB-Black/product-reviews/B07XVLW7YK/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&amp;reviewerType=all_reviews&quot;

apple &lt;- NULL

for(i in 1:100)

{
  
murl &lt;- read_html(as.character(paste(url,i,sep = &quot;=&quot;)))
  
rev &lt;- murl%&gt;%
    
html_nodes(&quot;.review-text&quot;)%&gt;%
    
html_text()
  
apple &lt;- c(apple,rev)

}

write.table(apple,&quot;apple1.txt&quot;,row.names = TRUE,col.names = TRUE,fileEncoding = &quot;utf-8-mac&quot;)

apple&lt;-read.csv(file.choose())

View(apple)
Change your url to:
url &lt;- &quot;https://www.amazon.in/Apple-iPhone-11-128GB-Black/product-reviews/B07XVLW7YK/ref=cm_cr_arp_d_paging_btm_next_2?ie=UTF8&amp;reviewerType=all_reviews&amp;pageNumber&quot;

Otherwise, as is what your current code is doing, you keep looping only the first page of reviews.