Skip to content

Instantly share code, notes, and snippets.

@fchevitarese
Created September 6, 2017 01:22
Show Gist options
  • Save fchevitarese/a02d6cfe1c12a3b0202262822a7c43d1 to your computer and use it in GitHub Desktop.
Save fchevitarese/a02d6cfe1c12a3b0202262822a7c43d1 to your computer and use it in GitHub Desktop.
from bs4 import BeautifulSoup
import requests
resp = requests.get(url)
soup = BeautifulSoup(resp.text, 'lxml') # Usa ele porque é mais rápido
for name in soup.findAll('td', {'class': 'label'}):
print(name.text) # Printa o texto
print(name.get_text()) # Printa também
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment