kopia lustrzana https://github.com/sq9atk/sr0wx
drobne poprawki
rodzic
e30bee6eb8
commit
4a26950146
|
@ -94,9 +94,7 @@ class ImgwPodestSq9atk(SR0WXModule):
|
||||||
'przekroczenieStanu': stan,
|
'przekroczenieStanu': stan,
|
||||||
# 'przekroczenieStanuStan': stan,
|
# 'przekroczenieStanuStan': stan,
|
||||||
'tendencja': tendencja }
|
'tendencja': tendencja }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_data(s):
|
def get_data(s):
|
||||||
|
|
||||||
stanyOstrzegawcze = {}
|
stanyOstrzegawcze = {}
|
||||||
|
@ -140,14 +138,10 @@ class ImgwPodestSq9atk(SR0WXModule):
|
||||||
s.__logger.info("::: Brak danych!!! "+ wodowskaz )
|
s.__logger.info("::: Brak danych!!! "+ wodowskaz )
|
||||||
pass
|
pass
|
||||||
|
|
||||||
message = "_ _ ";
|
|
||||||
if stanyOstrzegawcze!={} or stanyAlarmowe!={}:
|
if stanyOstrzegawcze!={} or stanyAlarmowe!={}:
|
||||||
message += 'komunikat_hydrologiczny_imgw _ '
|
message = ' _ komunikat_hydrologiczny_imgw _ '
|
||||||
|
|
||||||
if stanyAlarmowe!={}:
|
if stanyAlarmowe!={}:
|
||||||
# Sprawdzenie dla których wodowskazów mamy przekroczone
|
|
||||||
# stany alarmowe -- włącz ctcss
|
|
||||||
|
|
||||||
message +=' przekroczenia_stanow_alarmowych '
|
message +=' przekroczenia_stanow_alarmowych '
|
||||||
for rzeka in sorted(stanyAlarmowe.keys()):
|
for rzeka in sorted(stanyAlarmowe.keys()):
|
||||||
message +=' rzeka %s wodowskaz %s '%(rzeka, \
|
message +=' rzeka %s wodowskaz %s '%(rzeka, \
|
||||||
|
@ -158,11 +152,12 @@ class ImgwPodestSq9atk(SR0WXModule):
|
||||||
for rzeka in sorted(stanyOstrzegawcze.keys()):
|
for rzeka in sorted(stanyOstrzegawcze.keys()):
|
||||||
message += 'rzeka %s wodowskaz %s '%(format(rzeka), \
|
message += 'rzeka %s wodowskaz %s '%(format(rzeka), \
|
||||||
" wodowskaz ".join([format(w) for w in sorted(stanyOstrzegawcze[rzeka])]),)
|
" wodowskaz ".join([format(w) for w in sorted(stanyOstrzegawcze[rzeka])]),)
|
||||||
|
message += ' '
|
||||||
|
else:
|
||||||
|
message = ' '
|
||||||
|
|
||||||
s.__logger.info("::: Przekazuję przetworzone dane...\n")
|
s.__logger.info("::: Przekazuję przetworzone dane...\n")
|
||||||
|
|
||||||
message += ' _ '
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"message": message,
|
"message": message,
|
||||||
"source": "imgw",
|
"source": "imgw",
|
||||||
|
|
|
@ -52,7 +52,7 @@ class MeteoalarmSq9atk(SR0WXModule):
|
||||||
|
|
||||||
|
|
||||||
def findDataInHtml(self, html):
|
def findDataInHtml(self, html):
|
||||||
self.__logger.info("::: przetwarzam dane...")
|
self.__logger.info("::: Przetwarzam dane...\n")
|
||||||
patternTable = re.compile(r'<table[^>]*class="[^>]*meteo_table[^>]*"[^>]*>.*?</table>', re.DOTALL)
|
patternTable = re.compile(r'<table[^>]*class="[^>]*meteo_table[^>]*"[^>]*>.*?</table>', re.DOTALL)
|
||||||
matchTable = patternTable.search(html)
|
matchTable = patternTable.search(html)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue