I am trying to scrape amazon reviews using beautiful soup. when I am trying scrape review title I am getting both rating and review title. I am not finding where I am wrong?
Here is the code:
for item in reviews:
print(item.find(‘a’,{‘data-hook’ : ‘review-title’}).text.strip())
the output is:
5.0 out of 5 stars
Excellent Condition Means Something Different
5.0 out of 5 stars
Great quality phone
1.0 out of 5 stars
Not truly unlocked device!
I am expecting only review title.
Prema Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.