Skip to content

Commit

Permalink
Merge pull request #590 from tanjiarui15/fix-parsing-for-edx-multiple…
Browse files Browse the repository at this point in the history
…-sections

Fix parsing for edx multiple sections
  • Loading branch information
balta2ar authored Feb 25, 2020
2 parents 1009c18 + ee06b08 commit 81e9fbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edx_dl/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def _make_url(section_soup): # FIXME: Extract from here and test

def _get_section_name(section_soup): # FIXME: Extract from here and test
try:
return section_soup.a.h4.string.strip()
return section_soup.button.h3.string.strip()
except AttributeError:
return None

Expand All @@ -394,7 +394,7 @@ def _make_subsections(section_soup):
return subsections

soup = BeautifulSoup(page)
sections_soup = soup.find_all('li', class_=['outline-item section'])
sections_soup = soup.find_all('li', class_=['outline-item','section'])

sections = [Section(position=i,
name=_get_section_name(section_soup),
Expand Down

0 comments on commit 81e9fbc

Please sign in to comment.