Skip to content

Instantly share code, notes, and snippets.

@QuantTraderEd
Created August 1, 2018 14:48
Show Gist options
  • Save QuantTraderEd/5747fd3159aed0c38861ef79ec3e1585 to your computer and use it in GitHub Desktop.
Save QuantTraderEd/5747fd3159aed0c38861ef79ec3e1585 to your computer and use it in GitHub Desktop.
minarb_research
import bs4
html_text_file = "miniarb_research_20180713.html"
f = open(html_text_file, 'r')
html_text = f.read()
f.close()
soup = bs4.BeautifulSoup(html_text)
for line in soup.find_all('pre'):
line_text = line.get_text()
if 'count' in line_text:
line_lst = line_text.split('\r\n')
for new_line in line_lst:
if not new_line: break
new_line_lst = new_line.split()
if new_line_lst[0] not in ['big_mid', 'count']:
print new_line_lst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment