From cfb34ec08cfff65c9de214069dbb13a79f7b0bd8 Mon Sep 17 00:00:00 2001 From: Samuel Date: Fri, 7 Jul 2017 23:27:21 -0400 Subject: [PATCH] Extended fix to lists (class, subject, cle, etc) --- pyvt/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyvt/__init__.py b/pyvt/__init__.py index 2ebb072..ac26ba9 100644 --- a/pyvt/__init__.py +++ b/pyvt/__init__.py @@ -70,8 +70,12 @@ def _parse_table(self, html): if table is None: return None rows = [row for row in table.find_all('tr') if row.attrs == {}] - sections = [self._parse_row(c) for c in rows] - return sections + sections = [] + for c in rows: + pc = self._parse_row(c) + if pc is not None: + sections.append(pc) + return None if not sections else sections def _make_request(self, request_data): r = requests.post(self.url, data=request_data)