Refine
This commit is contained in:
@@ -25,11 +25,16 @@ def queryallrecordsbydateproperty(date: str):
|
||||
print(f'queryallrecordsbydateproperty: {date}')
|
||||
|
||||
try:
|
||||
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=node&property=head')
|
||||
|
||||
node_properties = ['head', 'pressure', 'actualdemand', 'quality']
|
||||
for property in node_properties:
|
||||
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=node&property={property}')
|
||||
html = response.read().decode('utf-8')
|
||||
#print(html)
|
||||
|
||||
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=link&property=flow')
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user