Compare commits
No commits in common. "e1ff78118daafbd732adc34ba7d7020f0de348e8" and "e9fbf09a3585f68f7a010791d7ea356d81ba5de9" have entirely different histories.
e1ff78118d
...
e9fbf09a35
1 changed files with 2 additions and 11 deletions
|
|
@ -59,12 +59,11 @@ def download_page(code):
|
|||
"""
|
||||
Downloads the page from proxiwash website
|
||||
"""
|
||||
url = WASHINSA_URL + code
|
||||
try:
|
||||
with urllib.request.urlopen(url) as response:
|
||||
with urllib.request.urlopen(WASHINSA_URL + code) as response:
|
||||
return response.read().decode()
|
||||
except:
|
||||
print("Error processing following url: " + url)
|
||||
print("Error processing following url: " + WASHINSA_URL)
|
||||
return ""
|
||||
|
||||
|
||||
|
|
@ -86,13 +85,6 @@ def is_machine_dryer(row):
|
|||
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):
|
||||
"""
|
||||
Gets the current machine number.
|
||||
|
|
@ -192,7 +184,6 @@ def get_parsed_data(rows):
|
|||
machine = {
|
||||
"number": get_machine_number(row),
|
||||
"state": state.value,
|
||||
"maxWeight ": get_machine_weight(row),
|
||||
"startTime": "",
|
||||
"endTime": "",
|
||||
"donePercent": "",
|
||||
|
|
|
|||
Loading…
Reference in a new issue