diff options
author | Alban Gruin | 2017-09-09 20:12:39 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-09 20:12:39 +0200 |
commit | 5352d2eb1d787d76971a02c40f6691ca1b74bc13 (patch) | |
tree | cd62f4c8f2b49e4223a17b7506e72ba666b24986 /management/commands/scraptimetables.py | |
parent | b158b94ca7f8447d60166fbfc6886562bb839965 (diff) |
Récupération des edts qui contiennent tous les groupes
Diffstat (limited to 'management/commands/scraptimetables.py')
-rw-r--r-- | management/commands/scraptimetables.py | 8 |
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) |