Created
August 1, 2018 14:48
-
-
Save QuantTraderEd/5747fd3159aed0c38861ef79ec3e1585 to your computer and use it in GitHub Desktop.
minarb_research
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 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