diff --git a/scraper/classes/course.py b/scraper/classes/course.py index 89a89f36..5eef5e31 100644 --- a/scraper/classes/course.py +++ b/scraper/classes/course.py @@ -63,9 +63,9 @@ def __init__(self, row, geodata): self.activity = activity.group(0)[1:] # remove leading dash else: self.activity = 'Err' - + occurrence = re.search('/[0-9]+', self.name) - + # remove leading slash and default to 01 if unspecified self.occurrence = '01' if not occurrence else occurrence.group(0)[1:] diff --git a/scraper/classes/coursesPage.py b/scraper/classes/coursesPage.py index 9516d0c5..fa5bc728 100644 --- a/scraper/classes/coursesPage.py +++ b/scraper/classes/coursesPage.py @@ -44,6 +44,3 @@ def Chunk(coursesPage, chunk): if n < max: s = slice(n, max) yield coursesPage.courseList[s] - - - \ No newline at end of file diff --git a/scraper/classes/loadingBar.py b/scraper/classes/loadingBar.py index 559b7211..4bf05919 100644 --- a/scraper/classes/loadingBar.py +++ b/scraper/classes/loadingBar.py @@ -18,5 +18,5 @@ def printProgressBar(iteration, total, prefix = '', suffix = '', decimals = 1, l bar = fill * filledLength + '-' * (length - filledLength) print('\r%s |%s| %s%% %s' % (prefix, bar, percent, suffix), end = printEnd) # Print New Line on Complete - if iteration == total: - print() \ No newline at end of file + if iteration == total: + print() diff --git a/scraper/classes/sessionData.py b/scraper/classes/sessionData.py index deeccbe4..b0ff4ef2 100644 --- a/scraper/classes/sessionData.py +++ b/scraper/classes/sessionData.py @@ -4,7 +4,7 @@ def __init__(self, soup): self.viewStateGenerator = soup.find(id='__VIEWSTATEGENERATOR')['value'] self.eventValidation = soup.find(id='__EVENTVALIDATION')['value'] def toDict(self): - return {"__VIEWSTATE": self.viewState, + return {"__VIEWSTATE": self.viewState, "__VIEWSTATEGENERATOR": self.viewStateGenerator, "__EVENTVALIDATION": self.eventValidation} def asModuleList(self): @@ -15,4 +15,4 @@ def withTargetLinkType(self, target, linktype): params["__EVENTTARGET"] = target params["tLinkType"] = linktype params["__EVENTARGUMENT"] = "" - return params \ No newline at end of file + return params