Skip to content

Instantly share code, notes, and snippets.

@l34marr
Last active May 7, 2022 09:39
Show Gist options
  • Save l34marr/8f791e9e7602b7aed0765620e992aef9 to your computer and use it in GitHub Desktop.
Save l34marr/8f791e9e7602b7aed0765620e992aef9 to your computer and use it in GitHub Desktop.
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