I'm scraping all the comments from https://www.consumeraffairs.com/privacy/transunion.html website
page_list = []
def pagination(soup):
for i in range(0,32):
domain = "https://www.consumeraffairs.com/privacy/transunion.html?page="+str(i)
page_list.append(domain)
return page_list
pages = pagination(soup)
print(pages)
how to capture the comments under these pages as it shows
import time
comment_list = []
def get_comments(urls):
for url in urls:
try:
print(url)
#comment = soup.find_all('div',{'class':'rvw-bd'})
comment = soup.find_all('div',{'class':'rvw-bd'})
print(len(comment))
for x in range(len(comment)):
comment_list.append(comment[x].p.text.strip())
except:
continue
time.sleep(30)
return comment_list
comments = get_comments(pages)
I used this code but it scraps only first 10 in first page. how to fix this