Skip to content

Instantly share code, notes, and snippets.

@tylerburdsall
Last active September 6, 2017 19:23
Show Gist options
  • Save tylerburdsall/8e6e55ab2a9f5219f30bf6d09713bc5e to your computer and use it in GitHub Desktop.
Save tylerburdsall/8e6e55ab2a9f5219f30bf6d09713bc5e to your computer and use it in GitHub Desktop.
Initial search
from urllib.request import urlopen
from bs4 import BeautifulSoup
website = 'https://saltandstraw.com/flavors/'
page = urlopen(website)
soup = BeautifulSoup(page, 'html.parser')
results = soup.findAll('div', attrs={'class':'entry-title'})
for title in results:
print(title.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment