Refine
This commit is contained in:
@@ -25,13 +25,18 @@ def queryallrecordsbydateproperty(date: str):
|
|||||||
print(f'queryallrecordsbydateproperty: {date}')
|
print(f'queryallrecordsbydateproperty: {date}')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=node&property=head')
|
|
||||||
html = response.read().decode('utf-8')
|
|
||||||
#print(html)
|
|
||||||
|
|
||||||
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=link&property=flow')
|
node_properties = ['head', 'pressure', 'actualdemand', 'quality']
|
||||||
html = response.read().decode('utf-8')
|
for property in node_properties:
|
||||||
#print(html)
|
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=node&property={property}')
|
||||||
|
html = response.read().decode('utf-8')
|
||||||
|
#print(html)
|
||||||
|
|
||||||
|
link_properties = ['flow', 'velocity', 'headloss', 'quality']
|
||||||
|
for property in link_properties:
|
||||||
|
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=link&property={property}')
|
||||||
|
html = response.read().decode('utf-8')
|
||||||
|
#print(html)
|
||||||
|
|
||||||
except urllib.error.URLError as e:
|
except urllib.error.URLError as e:
|
||||||
print("Error")
|
print("Error")
|
||||||
|
|||||||
Reference in New Issue
Block a user