I don't know whether you will like the way of pagination but simple, neat and clean, few code can complete everything the simplest way where as I scrape the site using Scrapy CrawlSpider.
CODE:
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
class AmazonReviewsSpider(CrawlSpider):
name = 'reviews'
allowed_domains = ['www.amazon.in']
start_urls = ['https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews']
rules = (
Rule(LinkExtractor(restrict_xpaths='//a[@data-hook="review-title"]'), callback='parse_item', follow=False),
Rule(LinkExtractor(restrict_xpaths='//*[@id="cm_cr-pagination_bar"]/ul/li/a'),follow=True),
)
def parse_item(self, response):
yield{
'Reviewer':response.xpath('//*[@class="a-profile-name"]/text()').get()
}
OUTPUT:
{'Reviewer': 'Shaheen Khan'}
2021-08-01 12:33:18 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R1PL6L4U9NYL58/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:18 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:18 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R2OBKWAHDBDKDA/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:18 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R1PL6L4U9NYL58/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Sidhesh Mardolkar'}
2021-08-01 12:33:18 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R21ZXYGSCCPE5V/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:18 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R2OBKWAHDBDKDA/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Atowar Rahman'}
2021-08-01 12:33:18 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R32Y55ISEX5B6P/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:18 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R19PEVFYAI50FE/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:18 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R21ZXYGSCCPE5V/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'leo'}
2021-08-01 12:33:19 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R32Y55ISEX5B6P/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Asim ahmed'}
2021-08-01 12:33:19 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R19PEVFYAI50FE/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Mahavir singh'}
2021-08-01 12:33:19 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/RYD458HW5E42N/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:19 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/RYD458HW5E42N/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Ashish Modanwal'}
2021-08-01 12:33:19 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/RUHTIOZJGQ7YX/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:19 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/RUHTIOZJGQ7YX/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'muskan'}
2021-08-01 12:33:19 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R2X2WTTAWX9V2J/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:19 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R2X2WTTAWX9V2J/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Susheel Kumar'}
2021-08-01 12:33:19 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R15DM4BMSG84D8/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:19 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R2TU8L168L3NFO/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:19 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R15DM4BMSG84D8/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Shashi'}
2021-08-01 12:33:19 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R2TU8L168L3NFO/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Akhil'}
2021-08-01 12:33:19 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R1QZDPG9S17TDN/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews)
2021-08-01 12:33:19 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R1Z8DTMO2OF7PT/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R1QZDPG9S17TDN/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Siddhartha'}
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_1?ie=UTF8&reviewerType=all_reviews> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R1Z8DTMO2OF7PT/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Shravya kale'}
2021-08-01 12:33:20 [scrapy.dupefilters] DEBUG: Filtered duplicate request: <GET https://www.amazon.in/gp/customer-reviews/R1XAMZ9LKHPV8A/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> - no more duplicates will be shown (see DUPEFILTER_DEBUG to show all duplicates)
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/RKG3L6Y5ZDMGI/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R396ADCZXCRGSB/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/RKG3L6Y5ZDMGI/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'S singh'}
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R396ADCZXCRGSB/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Shourya satyam'}
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R2USNFWP35AWMO/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R12T25TWUEVJ80/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_3?ie=UTF8&pageNumber=3&reviewerType=all_reviews> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R3L7T6GAL2W2GC/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R2USNFWP35AWMO/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'santhakumar'}
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/RA9C9WOIMZOQR/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R3NN436HHQPS5G/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_2?ie=UTF8&pageNumber=2&reviewerType=all_reviews)
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R12T25TWUEVJ80/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Harsh Gupta'}
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R3L7T6GAL2W2GC/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'vishal thakare'}
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/RA9C9WOIMZOQR/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Ayushi'}
2021-08-01 12:33:20 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R3NN436HHQPS5G/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'NIKET'}
2021-08-01 12:33:21 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/RFMWLES7SUYSR/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_3?ie=UTF8&pageNumber=3&reviewerType=all_reviews)
2021-08-01 12:33:21 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R3LZD41TT5MPRN/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_3?ie=UTF8&pageNumber=3&reviewerType=all_reviews)
2021-08-01 12:33:21 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/RFMWLES7SUYSR/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Best prodAmazon Customer'}
2021-08-01 12:33:21 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.amazon.in/gp/customer-reviews/R1RZQAQO5T2OAX/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD> (referer: https://www.amazon.in/Skybags-Brat-Black-Casual-Backpack/product-reviews/B08Z1HHHTD/ref=cm_cr_arp_d_paging_btm_3?ie=UTF8&pageNumber=3&reviewerType=all_reviews)
2021-08-01 12:33:21 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R3LZD41TT5MPRN/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'rama krishna . y'}
2021-08-01 12:33:21 [scrapy.core.scraper] DEBUG: Scraped from <200 https://www.amazon.in/gp/customer-reviews/R1RZQAQO5T2OAX/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B08Z1HHHTD>
{'Reviewer': 'Amit Biswas'}