kopia lustrzana https://github.com/sq9atk/sr0wx
napraw modułu geomagnetic
rodzic
d42e41c628
commit
e03a918495
|
@ -3,6 +3,7 @@
|
|||
|
||||
import logging, re, subprocess
|
||||
import urllib2
|
||||
from pprint import pprint
|
||||
|
||||
from sr0wx_module import SR0WXModule
|
||||
|
||||
|
@ -49,9 +50,7 @@ class GeoMagneticSq9atk(SR0WXModule):
|
|||
|
||||
html = self.downloadDataFromUrl(self.__service_url)
|
||||
|
||||
|
||||
r = re.compile(r'<td class="gm_td gm-(.*?)">\n(.*?)(\d)\n(.*?)</td>') #pobieramy listę wartości
|
||||
|
||||
r = re.compile(r'<div class="widget__value w_gm__value(.*?)">(\d)</div>')
|
||||
|
||||
return r.findall(html)
|
||||
|
||||
|
@ -63,7 +62,7 @@ class GeoMagneticSq9atk(SR0WXModule):
|
|||
|
||||
for i, val in enumerate(data):
|
||||
if dayNum > 1 or hour > current_hour: # omijamy godziny z przeszłości
|
||||
value = data[i][2]
|
||||
value = data[i][1]
|
||||
output[dayNum][hour] = value
|
||||
|
||||
hour += 3
|
||||
|
|
Ładowanie…
Reference in New Issue