extracting comments from different pages

my task is to extract comments from the booking.com, link is given as Hotel Tbilisi Tower

i want to extract comments from different pages, namely if you click on read all reviews, we can see that there exist more than 300 page and from each page i can extract comments, i wrote following code :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>from bs4 import BeautifulSoup
import requests
url ='https://www.booking.com/hotel/ge/tbilisi-tower-tbilisi.en-gb.html?aid=339738&label=tbilisi-9HByUQ9gPsLl56jk1ktJYAS388385943105%3Apl%3Ata%3Ap11820%3Ap2%3Aac%3Aap%3Aneg%3Afi%3Atikwd-90146752673%3Alp9198877%3Ali%3Adec%3Adm%3Appccp%3DUmFuZG9tSVYkc2RlIyh9YU5pXiVhsEsYF5VzKbQXpIg&sid=1c94570f144a332c36feeee1d46bcbe0&all_sr_blocks=534523702_210668006_2_1_0&checkin=2024-12-20&checkout=2024-12-21&dest_id=900047975&dest_type=city&dist=0&group_adults=2&group_children=0&hapos=1&highlighted_blocks=534523702_210668006_2_1_0&hpos=1&matching_block_id=534523702_210668006_2_1_0&no_rooms=1&req_adults=2&req_children=0&room1=A%2CA&sb_price_type=total&sr_order=popularity&sr_pri_blocks=534523702_210668006_2_1_0__18176&srepoch=1734279281&srpvid=b491722d29710489&type=total&ucfs=1&#tab-main'
content =requests.get(url).text
content =BeautifulSoup(content,'html.parser')
print(content.find_all("div",class_='a53cbfa6de b5726afd0b'))
print("here is full messages :")
for message in content.find_all("div",class_='a53cbfa6de b5726afd0b'):
print(message.text)
</code>
<code>from bs4 import BeautifulSoup import requests url ='https://www.booking.com/hotel/ge/tbilisi-tower-tbilisi.en-gb.html?aid=339738&label=tbilisi-9HByUQ9gPsLl56jk1ktJYAS388385943105%3Apl%3Ata%3Ap11820%3Ap2%3Aac%3Aap%3Aneg%3Afi%3Atikwd-90146752673%3Alp9198877%3Ali%3Adec%3Adm%3Appccp%3DUmFuZG9tSVYkc2RlIyh9YU5pXiVhsEsYF5VzKbQXpIg&sid=1c94570f144a332c36feeee1d46bcbe0&all_sr_blocks=534523702_210668006_2_1_0&checkin=2024-12-20&checkout=2024-12-21&dest_id=900047975&dest_type=city&dist=0&group_adults=2&group_children=0&hapos=1&highlighted_blocks=534523702_210668006_2_1_0&hpos=1&matching_block_id=534523702_210668006_2_1_0&no_rooms=1&req_adults=2&req_children=0&room1=A%2CA&sb_price_type=total&sr_order=popularity&sr_pri_blocks=534523702_210668006_2_1_0__18176&srepoch=1734279281&srpvid=b491722d29710489&type=total&ucfs=1&#tab-main' content =requests.get(url).text content =BeautifulSoup(content,'html.parser') print(content.find_all("div",class_='a53cbfa6de b5726afd0b')) print("here is full messages :") for message in content.find_all("div",class_='a53cbfa6de b5726afd0b'): print(message.text) </code>
from bs4 import BeautifulSoup
import requests
url ='https://www.booking.com/hotel/ge/tbilisi-tower-tbilisi.en-gb.html?aid=339738&label=tbilisi-9HByUQ9gPsLl56jk1ktJYAS388385943105%3Apl%3Ata%3Ap11820%3Ap2%3Aac%3Aap%3Aneg%3Afi%3Atikwd-90146752673%3Alp9198877%3Ali%3Adec%3Adm%3Appccp%3DUmFuZG9tSVYkc2RlIyh9YU5pXiVhsEsYF5VzKbQXpIg&sid=1c94570f144a332c36feeee1d46bcbe0&all_sr_blocks=534523702_210668006_2_1_0&checkin=2024-12-20&checkout=2024-12-21&dest_id=900047975&dest_type=city&dist=0&group_adults=2&group_children=0&hapos=1&highlighted_blocks=534523702_210668006_2_1_0&hpos=1&matching_block_id=534523702_210668006_2_1_0&no_rooms=1&req_adults=2&req_children=0&room1=A%2CA&sb_price_type=total&sr_order=popularity&sr_pri_blocks=534523702_210668006_2_1_0__18176&srepoch=1734279281&srpvid=b491722d29710489&type=total&ucfs=1&#tab-main'
content =requests.get(url).text
content =BeautifulSoup(content,'html.parser')
print(content.find_all("div",class_='a53cbfa6de b5726afd0b'))
print("here is full messages :")
for  message in content.find_all("div",class_='a53cbfa6de b5726afd0b'):
    print(message.text)

and it returns following result :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>“Good room for family, with connecting door. Room is clean.
Staffs are helpful, breakfast is good. Location is good. Food from bar restaurant is good taste.”
“Amazing rooms, lovely staff and peaceful! Felt safe too !”
“ძაალიან სასიამოვნო გარემო , მოწესრიგებული და ყურადღებიანი პერსონალი❤️ სუფთა ნომერი ❤️ განსაკუთრებით ყურადღებიანი და თბილი დიასახლისები ❤️”
“Nice staff, rich breakfast, clean and tidy space, excellent location”
“The room and bathroom were big enough. Staff and manager were awesome. Convenient location with parking. Great favorites 😍. Breakfast was with great option. The view from the room was beautiful 😍”
“Nice new 4 stae hotel, has a pool, comfortable beds.”
“Everything was great , breakfast is so tasty and hotel staff is very friendly”
“An excellent hotel with kind and wonderful staff. I was really satisfied and highly recommend it to everyone. The breakfast was great, the cleanliness was exceptional, and it is located in a...”
“Location was good. You did not mention that you have a restaurant on the premises which we found very convenient.”
“The WiFi signal in my room was poor. Only one elevator in the building, which made moving in and out, taking a long time. For most of the occasions, I used the stairs.”
“Good room for family, with connecting door. Room is clean.
Staffs are helpful, breakfast is good. Location is good. Food from bar restaurant is good taste.”
“Amazing rooms, lovely staff and peaceful! Felt safe too !”
“ძაალიან სასიამოვნო გარემო , მოწესრიგებული და ყურადღებიანი პერსონალი❤️ სუფთა ნომერი ❤️ განსაკუთრებით ყურადღებიანი და თბილი დიასახლისები ❤️”
“Nice staff, rich breakfast, clean and tidy space, excellent location”
“The room and bathroom were big enough. Staff and manager were awesome. Convenient location with parking. Great favorites 😍. Breakfast was with great option. The view from the room was beautiful 😍”
“Nice new 4 stae hotel, has a pool, comfortable beds.”
“Everything was great , breakfast is so tasty and hotel staff is very friendly”
“An excellent hotel with kind and wonderful staff. I was really satisfied and highly recommend it to everyone. The breakfast was great, the cleanliness was exceptional, and it is located in a fantastic location.”
“Location was good. You did not mention that you have a restaurant on the premises which we found very convenient.”
“The WiFi signal in my room was poor. Only one elevator in the building, which made moving in and out, taking a long time. For most of the occasions, I used the stairs.”
Process finished with exit code 0
</code>
<code>“Good room for family, with connecting door. Room is clean. Staffs are helpful, breakfast is good. Location is good. Food from bar restaurant is good taste.” “Amazing rooms, lovely staff and peaceful! Felt safe too !” “ძაალიან სასიამოვნო გარემო , მოწესრიგებული და ყურადღებიანი პერსონალი❤️ სუფთა ნომერი ❤️ განსაკუთრებით ყურადღებიანი და თბილი დიასახლისები ❤️” “Nice staff, rich breakfast, clean and tidy space, excellent location” “The room and bathroom were big enough. Staff and manager were awesome. Convenient location with parking. Great favorites 😍. Breakfast was with great option. The view from the room was beautiful 😍” “Nice new 4 stae hotel, has a pool, comfortable beds.” “Everything was great , breakfast is so tasty and hotel staff is very friendly” “An excellent hotel with kind and wonderful staff. I was really satisfied and highly recommend it to everyone. The breakfast was great, the cleanliness was exceptional, and it is located in a...” “Location was good. You did not mention that you have a restaurant on the premises which we found very convenient.” “The WiFi signal in my room was poor. Only one elevator in the building, which made moving in and out, taking a long time. For most of the occasions, I used the stairs.” “Good room for family, with connecting door. Room is clean. Staffs are helpful, breakfast is good. Location is good. Food from bar restaurant is good taste.” “Amazing rooms, lovely staff and peaceful! Felt safe too !” “ძაალიან სასიამოვნო გარემო , მოწესრიგებული და ყურადღებიანი პერსონალი❤️ სუფთა ნომერი ❤️ განსაკუთრებით ყურადღებიანი და თბილი დიასახლისები ❤️” “Nice staff, rich breakfast, clean and tidy space, excellent location” “The room and bathroom were big enough. Staff and manager were awesome. Convenient location with parking. Great favorites 😍. Breakfast was with great option. The view from the room was beautiful 😍” “Nice new 4 stae hotel, has a pool, comfortable beds.” “Everything was great , breakfast is so tasty and hotel staff is very friendly” “An excellent hotel with kind and wonderful staff. I was really satisfied and highly recommend it to everyone. The breakfast was great, the cleanliness was exceptional, and it is located in a fantastic location.” “Location was good. You did not mention that you have a restaurant on the premises which we found very convenient.” “The WiFi signal in my room was poor. Only one elevator in the building, which made moving in and out, taking a long time. For most of the occasions, I used the stairs.” Process finished with exit code 0 </code>
“Good room for family, with connecting door. Room is clean.
Staffs are helpful, breakfast is good. Location is good. Food from bar restaurant is good taste.”
“Amazing rooms, lovely staff and peaceful! Felt safe too !”
“ძაალიან სასიამოვნო გარემო , მოწესრიგებული და ყურადღებიანი პერსონალი❤️ სუფთა ნომერი ❤️ განსაკუთრებით ყურადღებიანი და თბილი დიასახლისები ❤️”
“Nice staff, rich breakfast, clean and tidy space, excellent location”
“The room and bathroom were big enough. Staff and manager were awesome. Convenient location with parking.  Great favorites 😍. Breakfast was with great option. The view from the room was beautiful 😍”
“Nice new 4 stae hotel, has a pool, comfortable beds.”
“Everything was great , breakfast is so tasty and hotel staff is very friendly”
“An excellent hotel with kind and wonderful staff. I was really satisfied and highly recommend it to everyone. The breakfast was great, the cleanliness was exceptional, and it is located in a...”
“Location was good. You did not mention that you have a restaurant on the premises which we found very convenient.”
“The WiFi signal in my room was poor. Only one elevator in the building, which made moving in and out, taking a long time. For most of the occasions, I used the stairs.”
“Good room for family, with connecting door. Room is clean.
Staffs are helpful, breakfast is good. Location is good. Food from bar restaurant is good taste.”
“Amazing rooms, lovely staff and peaceful! Felt safe too !”
“ძაალიან სასიამოვნო გარემო , მოწესრიგებული და ყურადღებიანი პერსონალი❤️ სუფთა ნომერი ❤️ განსაკუთრებით ყურადღებიანი და თბილი დიასახლისები ❤️”
“Nice staff, rich breakfast, clean and tidy space, excellent location”
“The room and bathroom were big enough. Staff and manager were awesome. Convenient location with parking.  Great favorites 😍. Breakfast was with great option. The view from the room was beautiful 😍”
“Nice new 4 stae hotel, has a pool, comfortable beds.”
“Everything was great , breakfast is so tasty and hotel staff is very friendly”
“An excellent hotel with kind and wonderful staff. I was really satisfied and highly recommend it to everyone. The breakfast was great, the cleanliness was exceptional, and it is located in a fantastic location.”
“Location was good. You did not mention that you have a restaurant on the premises which we found very convenient.”
“The WiFi signal in my room was poor. Only one elevator in the building, which made moving in and out, taking a long time. For most of the occasions, I used the stairs.”

Process finished with exit code 0

but i am not sure that it is comment from all pages, how can i extract comments from all pages? what i should add in order to scrape other pages as well?thanks in advance

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật