Skip to content

Instantly share code, notes, and snippets.

@coblezc
Last active February 2, 2017 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coblezc/bd2e3aa80252c4db9947efe397e5e831 to your computer and use it in GitHub Desktop.
Save coblezc/bd2e3aa80252c4db9947efe397e5e831 to your computer and use it in GitHub Desktop.
import bs4
import urllib
url = "https://www.amazon.com/TopHeadwear-Face-Mask-Colors-Black/dp/B00X82QUHY/ref=sr_1_8?ie=UTF8&qid=1486007211&sr=8-8&keywords=black+ski+mask"
html = urllib.urlopen(url).read()
soup = bs4.BeautifulSoup(html, 'html.parser')
titles = soup.select('.review-data')
for title in titles:
print title.text.strip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment