mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 12:12:54 +01:00
Fix a couple more bugs related to wunderground's site-format change.
This commit is contained in:
parent
b05834fb3b
commit
86822f06e6
@ -345,7 +345,6 @@ class Weather(callbacks.Plugin):
|
|||||||
text = utils.web.getUrl(url)
|
text = utils.web.getUrl(url)
|
||||||
severe = ''
|
severe = ''
|
||||||
m = self._wunderSevere.search(text)
|
m = self._wunderSevere.search(text)
|
||||||
self.log.critical('%s', m)
|
|
||||||
if m:
|
if m:
|
||||||
severe = ircutils.bold(format(' %s', m.group(1)))
|
severe = ircutils.bold(format(' %s', m.group(1)))
|
||||||
if 'Search not found' in text or \
|
if 'Search not found' in text or \
|
||||||
@ -404,7 +403,7 @@ class Weather(callbacks.Plugin):
|
|||||||
# set to "-" instead of an actual reading. So, we'll just catch
|
# set to "-" instead of an actual reading. So, we'll just catch
|
||||||
# the ValueError from trying to unpack a tuple of the wrong size.
|
# the ValueError from trying to unpack a tuple of the wrong size.
|
||||||
try:
|
try:
|
||||||
(dew, deg, unit) = info['Dew Point'].split()
|
(dew, deg, unit) = info['Dew Point'].split()[3:]
|
||||||
if convert:
|
if convert:
|
||||||
dew = self._getTemp(int(dew), deg, unit, msg.args[0])
|
dew = self._getTemp(int(dew), deg, unit, msg.args[0])
|
||||||
else:
|
else:
|
||||||
@ -417,7 +416,7 @@ class Weather(callbacks.Plugin):
|
|||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError):
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
(chill, deg, unit) = info['Dew Point'].split()
|
(chill, deg, unit) = info['Windchill'].split()[3:]
|
||||||
if convert:
|
if convert:
|
||||||
chill = self._getTemp(int(chill), deg, unit, msg.args[0])
|
chill = self._getTemp(int(chill), deg, unit, msg.args[0])
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user