Skip to content

Instantly share code, notes, and snippets.

@victorhsanjos
Last active April 13, 2018 14:26
Show Gist options
  • Save victorhsanjos/48d7699e5b669c2dbb812f86e48a745c to your computer and use it in GitHub Desktop.
Save victorhsanjos/48d7699e5b669c2dbb812f86e48a745c to your computer and use it in GitHub Desktop.
from bs4 import BeautifulSoup
html_doc = """
<tr>
<td>Dado 1</td>
<td>Dado 2</td>
</tr>
<tr>
<td>Dado 3</td>
<td>Dado 4</td>
</tr>
"""
soup = BeautifulSoup(html_doc, 'html.parser')
for tr in soup.find_all('tr'):
print(tr.get_text().strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment