Skip to content

Commit

Permalink
nice nice search now works
Browse files Browse the repository at this point in the history
  • Loading branch information
jobchong committed Feb 29, 2016
1 parent 89fd1f1 commit b86a2a2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions grep.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
if filename.endswith(".html"):
with open("/Users/jobchong/git/scrapelawnet/" + filename) as currentCase:
soup = BeautifulSoup(currentCase, "html.parser")
facts = str(soup.find_all("p"))
if searchTerm in currentCase:
f.write(facts)
paras = soup.find_all("p")
for para in paras:
parastrip = para.get_text()
for i in searchTerm:
if i in parastrip:
f.write(parastrip.encode("utf-8"))
f.write("\n")

0 comments on commit b86a2a2

Please sign in to comment.