mirror of
https://github.com/Code-For-Groningen/temmies.git
synced 2025-03-15 07:10:15 +01:00
Fixed get_course_by_tag name logic error (#14)
This commit is contained in:
parent
a1104522f1
commit
6a781ad238
@ -53,11 +53,9 @@ class Year:
|
|||||||
|
|
||||||
soup = BeautifulSoup(response.text, "lxml")
|
soup = BeautifulSoup(response.text, "lxml")
|
||||||
|
|
||||||
title_element = soup.find("h1")
|
title_elements = soup.find_all("a", class_="fill accent large")
|
||||||
if not title_element:
|
if title_elements:
|
||||||
title_elements = soup.find_all("a", class_="fill accent large")
|
title_element = title_elements[-1]
|
||||||
if title_elements:
|
|
||||||
title_element = title_elements[-1]
|
|
||||||
|
|
||||||
if title_element:
|
if title_element:
|
||||||
course_title = title_element.get_text(strip=True)
|
course_title = title_element.get_text(strip=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user