yes I have the same problem with multiple results...djevrek wrote:There is still error with multiple search. See this
<Moonshine> !weather belgrade
<Spremna> Multiple Results Found: Belgrade, Maine; Belgrade, Minnesota; Belgrade, Missouri; Belgrade, Montana; Belgrade, Nebraska; Belgrade, Serbia; Belgrade, Serbia
<Moonshine> !weather belgrade, serbia
<Spremna> Multiple Results Found: Belgrade, Serbia; Belgrade, Serbia
I see that now, thanks. I just googled for the script name and was taken directly to this thread, I thought this was the discussion thread for the script.speechles wrote:Try reading. In fact, try reading the thread directly below this one. A fix has been provided, all you need to do is be smart enough to find it.sniepre wrote:Has anyone had the temperatures stop being displayed? For the last day or so, most all fields show up still except for temperature.
In the interest of keeping things simple.sniepre wrote:I see that now, thanks. I just googled for the script name and was taken directly to this thread, I thought this was the discussion thread for the script.speechles wrote:Try reading. In fact, try reading the thread directly below this one. A fix has been provided, all you need to do is be smart enough to find it.sniepre wrote:Has anyone had the temperatures stop being displayed? For the last day or so, most all fields show up still except for temperature.
Code: Select all
regexp -- {pwsvariable="tempf".+?>.+?nobr">.+?>(.+?)</span>.*?F</span>.*?/.+?nobr">.+?>(.+?)</span>} $html - output(tempf) output(tempc)
eXtremer wrote:incitch, could you resolve the multiple results for the Chisinau City ?
Code: Select all
# TODO: #
# - fix multiple results, take best match, etc #
Code: Select all
(18:12:32) <visitant> [18:12] incith:weather-2.8k: <incith/private> !weather india
(18:12:35) <visitant> [18:12] removals: 423
(18:12:35) <visitant> [18:12] found: 28
(example of both locations with no data):
(18:13:14) <visitant> [18:13] incith:weather-2.8k: <incith/private> !weather goa, india
(18:13:14) <visitant> [18:13] removals: 2
(18:13:14) <visitant> [18:13] found: 0
(18:13:51) <visitant> [18:13] incith:weather-2.8k: <incith/private> !weather quebec
(18:13:51) <visitant> [18:13] removals: 0
(18:13:51) <visitant> [18:13] found: 1
(18:13:51) <visitant> [18:13] multiple results:
(18:13:51) <visitant> [18:13] loop_loc: Quebec, Quebec (loop_url: /global/stations/71714.html)
Respect incith, that's the way 2 goincith wrote:Well, got a bit of motivation back, next release will feature improvements to multiple results, no more duplicate location problems (belgrade, chisinau, you're good to go).
Second, search results with no data will not be returned as a search result. For example, "Goa, India" location. It has a duplicate, and only one has data. So for that example, of course the one with data will be used to fetch the actual weather data. But during my testing, both of them lost data, and so the script would return no search results. So I will work around this, by just using one of the bad results, as it will not have data to use anyway.
Code: Select all
(18:12:32) <visitant> [18:12] incith:weather-2.8k: <incith/private> !weather india (18:12:35) <visitant> [18:12] removals: 423 (18:12:35) <visitant> [18:12] found: 28 (example of both locations with no data): (18:13:14) <visitant> [18:13] incith:weather-2.8k: <incith/private> !weather goa, india (18:13:14) <visitant> [18:13] removals: 2 (18:13:14) <visitant> [18:13] found: 0 (18:13:51) <visitant> [18:13] incith:weather-2.8k: <incith/private> !weather quebec (18:13:51) <visitant> [18:13] removals: 0 (18:13:51) <visitant> [18:13] found: 1 (18:13:51) <visitant> [18:13] multiple results: (18:13:51) <visitant> [18:13] loop_loc: Quebec, Quebec (loop_url: /global/stations/71714.html)