У меня есть мой Код ниже, но я не могу вытащить все отзывы .. Я могу вытащить только один ... может кто -нибудь помочь? Для этого заведения < /p>
Код: Выделить всё
import time
import random
from bs4 import BeautifulSoup as bs
import urllib.request as url
html = urllib.request.urlopen('https://www.yelp.com/biz/capri-laguna-laguna-beach').read().decode('utf-8')
soup = bs(html, 'html.parser')
relevant= soup.find_all('p', class_='comment__09f24__gu0rG css-qgunke')
for div in relevant:
for html_class in div.find_all('span',class_="raw__09f24__T4Ezm"):
text = html_class.find('span')
review = html_class.getText(
print(review)Подробнее здесь: https://stackoverflow.com/questions/718 ... utifulsoup