Last active
May 7, 2022 09:39
-
-
Save l34marr/8f791e9e7602b7aed0765620e992aef9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import computer as tool | |
def hacker(problem): | |
’’’ a generator | |
’’’ | |
try: | |
tool.fix(problem) | |
except: | |
report(bug) | |
yield patch # don’t reboot it | |
from bs4 import BeautifulSoup | |
with open("tseng-104-resume.html", "r", encoding="UTF-8") as f: | |
contents = f.read() | |
soup = BeautifulSoup(contents, "lxml") | |
resume = soup.find("div", {"class": "b-resume__info"}) | |
table = resume.find("table") | |
output_rows = [] | |
for row in table.findAll('tr'): | |
columns = table.findAll('td') | |
output_row = [] | |
for column in columns: | |
output_row.append(column.text) | |
output_rows.append(output_row) | |
print(resume) | |
print(table) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment