Scrape only the text of reviews from Airbnb using selenium?
05:44 01 Apr 2023

I am trying to extract reviews only from Airbnb webpages.

I tried the following code

from bs4 import BeautifulSoup
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
import time

airbnb_url = 'https://www.airbnb.co.in/rooms/605371928419351152?adults=1&category_tag=Tag%3A677&children=0&enable_m3_private_room=false&infants=0&pets=0&search_mode=flex_destinations_search&check_in=2023-04-09&check_out=2023-04-14&federated_search_id=da4d5c1e-7ad2-4539-8658-5f27dde826f8&source_impression_id=p3_1680264622_sNnLDFQJLlbBR4%2Fw'
driver.get(airbnb_url)
driver.maximize_window()
time.sleep(5)
page=BeautifulSoup(driver.page_source, 'lxml')
print(page)
print('**********************************************')
containers = page.select('[data-review-id] span.dir-ltr')
for container in containers:
    print(container.text)
    print('**********************************************')

Expected Response

This was a great find for us. Akash was our host for the stay. He was quite proactive in sharing with us instructions/information pertaining to the stay, followed-through diligently with the requisite actions, and was very responsive to the queries/additional-requests placed by us. Coming to the property itself - it's exactly as it looks in the pictures and perhaps prettier at this time of the year when there is a chill in the weather. The views from the living room and the 1st floor rooms are amazing. We couldnt try the pool owing to the chilly weather but it's kept quite clean and so is the garden area. It's around 40 mins drive from most of the to-visit places in/around nashik. The place is quite secure and the staff stays at the property.Coming to the people, Sonu and Shobha did their best to make us feel-at-home. Jeetendra was very keen to make this stay a foodie's delight with his expansive menu and the barbeque. And ofcourse we loved hanging out with Cocktail. Thank you all!!
**********************************************
We had an amazing  stay. The staff was very competent and made our stay fabulous. We will highly recommend this place to our family and friends.
**********************************************
We really enjoyed two days at this property. The villa as well as the entire property are well maintained. The view of lake as well as mountains are breathtaking. Very helpful care takers and food food.

Currently there is no output.

python-3.x selenium-webdriver web-scraping beautifulsoup