aboutsummaryrefslogtreecommitdiff
path: root/management/commands/scraptimetables.py
diff options
context:
space:
mode:
Diffstat (limited to 'management/commands/scraptimetables.py')
-rw-r--r--management/commands/scraptimetables.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/management/commands/scraptimetables.py b/management/commands/scraptimetables.py
index 4a07b3b..8ce51f6 100644
--- a/management/commands/scraptimetables.py
+++ b/management/commands/scraptimetables.py
@@ -29,10 +29,10 @@ class Command(BaseCommand):
def handle(self, *args, **options):
timetables = {}
for year, name, finder in self.__get_finders(options["url"]):
- if year in timetables:
- timetables[year].append((name, finder,))
- else:
- timetables[year] = [(name, finder,)]
+ soup = get_xml(finder)
+ for link in soup.find_all("a"):
+ if "toutes sections et semestres confondus" in link.text:
+ print(year, name, link.text)
def __get_finders(self, url):
soup = get_xml(url)