Compare commits

..

No commits in common. "e1ff78118daafbd732adc34ba7d7020f0de348e8" and "e9fbf09a3585f68f7a010791d7ea356d81ba5de9" have entirely different histories.

View file

@ -59,12 +59,11 @@ def download_page(code):
""" """
Downloads the page from proxiwash website Downloads the page from proxiwash website
""" """
url = WASHINSA_URL + code
try: try:
with urllib.request.urlopen(url) as response: with urllib.request.urlopen(WASHINSA_URL + code) as response:
return response.read().decode() return response.read().decode()
except: except:
print("Error processing following url: " + url) print("Error processing following url: " + WASHINSA_URL)
return "" return ""
@ -86,13 +85,6 @@ def is_machine_dryer(row):
return DRYER_STRING in row.contents[0].text return DRYER_STRING in row.contents[0].text
def get_machine_weight(row):
"""
Find the maximum weight supported by the machine.
"""
return int(re.search("LINGE (.*?) KG", row.contents[0].text).group(1))
def get_machine_number(row): def get_machine_number(row):
""" """
Gets the current machine number. Gets the current machine number.
@ -192,7 +184,6 @@ def get_parsed_data(rows):
machine = { machine = {
"number": get_machine_number(row), "number": get_machine_number(row),
"state": state.value, "state": state.value,
"maxWeight ": get_machine_weight(row),
"startTime": "", "startTime": "",
"endTime": "", "endTime": "",
"donePercent": "", "donePercent": "",