Skip to content

Commit

Permalink
style(scraper): lint whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jthvai committed Feb 20, 2024
1 parent 98ea0cd commit ffc02c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions scraper/classes/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]

Expand Down
3 changes: 0 additions & 3 deletions scraper/classes/coursesPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,3 @@ def Chunk(coursesPage, chunk):
if n < max:
s = slice(n, max)
yield coursesPage.courseList[s]



4 changes: 2 additions & 2 deletions scraper/classes/loadingBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
if iteration == total:
print()
4 changes: 2 additions & 2 deletions scraper/classes/sessionData.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -15,4 +15,4 @@ def withTargetLinkType(self, target, linktype):
params["__EVENTTARGET"] = target
params["tLinkType"] = linktype
params["__EVENTARGUMENT"] = ""
return params
return params

0 comments on commit ffc02c1

Please sign in to comment.