Skip to content

Commit

Permalink
Fixed initial html parsing for the nhl html pbp. Changed a soup.selec…
Browse files Browse the repository at this point in the history
…t to a soup.find_all
  • Loading branch information
HarryShomer committed Jan 17, 2019
1 parent e9d5dbf commit 3014890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hockey_scraper/html_pbp.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_soup(game_html):
"""
strainer = SoupStrainer('td', attrs={'class': re.compile(r'bborder')})
soup = BeautifulSoup(game_html, "lxml", parse_only=strainer)
soup = soup.select('td.+.bborder')
soup = soup.find_all("td", {"class": re.compile('.*bborder.*')})

if len(soup) == 0:
soup = BeautifulSoup(game_html, "html.parser", parse_only=strainer)
Expand Down

0 comments on commit 3014890

Please sign in to comment.